Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
243 views
Added a GridImageColumn to my grid so I could show a thumbnail image. I was asked to make it toggle on and off via combobox, so I use Page Init and toggle the Visibility property on the GridImageColumn based on the selection from the combo.

Test 1: If the page initially loads in Thumbnail View mode and I select items and hit Add to Cart, all is good. 
Test 2: If the page initially loads in List View Mode and I select items and hit Add to Cart, all is good
Test 3: If I toggle from Thumbnail to List View Mode and then select items and hit Add to Cart, my RadGrid.SelectedItems collection is empty? The same goes for initial load in List and toggle to Thumbnail.

How would the visibility of the column have anything to do with it being selected or not when I am doing everything the same

Thanks,
Jason
Iana Tsolova
Telerik team
 answered on 09 Nov 2010
3 answers
303 views

Hi,
I am using Telerik GridButton column with Confirm Text and Confirm Dialog type as radwindow.
I would like to close the parent window(window having the  grid) once user confirms the changes.
Is there a way to call close function to close parent window of the cofirm radwindow ?

Here is the code

<telerik:RadGrid ID="rgPositionFactorComp" runat="server" 
    AllowPaging="True" PageSize="5" GridLines="Both" AutoGenerateColumns="False"
<Columns>       
     <telerik:GridBoundColumn DataField="WorkflowFactorLevel" UniqueName="WorkflowFactorLevel" HeaderText="Existing Level">      </telerik:GridBoundColumn>
     <telerik:GridBoundColumn DataField="WorkflowLanguage"
UniqueName="WorkflowLanguage" HeaderText="Existing Language">
</telerik:GridBoundColumn>
</telerik:GridTemplateColumn>
  <telerik:GridButtonColumn CommandName="Reject" Text ="Reject"  
    ButtonType ="PushButton"
    UniqueName="btnReject"
    ConfirmText="Are you sure you want to Reject changes?"
   ConfirmTitle="Reject Changes?" ConfirmDialogType="RadWindow"> </telerik:GridButtonColumn>
</Columns>
</telerik:RadGrid>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue">
</telerik:RadWindowManager>

Thanks,
Manisha
Pavlina
Telerik team
 answered on 09 Nov 2010
1 answer
452 views
I would like to center the window. Can I do that may be in the code?
Maybe there is a center method ... RadWindowPopup.CenterMethode()?

<telerik:RadWindowManager ID="RadWindowManagerPopup" runat="server">
  <Windows>
    <telerik:RadWindow ID="RadWindowPopup" VisibleOnPageLoad="true" EnableShadow="true" Behaviors="Close, Move" AutoSize="true" runat="server" >
      <ContentTemplate>
        <div class="popup">
          <div class="popup_l">
           <div ID="PopupIcon" runat="server"></div>
          </div>
          <div class="popup_r">
            <asp:Literal ID="UserMessage" runat="server"></asp:Literal>
          </div>
          <div class="clear popup_button">
            <asp:Button ID="Button" runat="server" Text="OK" />
          </div>
        </div>
      </ContentTemplate>
    </telerik:RadWindow>
  </Windows>
</telerik:RadWindowManager>

Can you please give me a hint how I can do that.
And often in using CSS with me that would like a method best.


Regards Dani
Shinu
Top achievements
Rank 2
 answered on 09 Nov 2010
1 answer
236 views
Here is what I am trying to do.  I want a searchable combobox.  Enter key does nothing unless the text typed into the search match's something in the list, or something is already selected (highlighted) via the down/up arrows.

I feel I'm almost there.  I had to check eventArgs._domEvent to get the keyCode.  eventArgs.keyCode is undefined.
The line: item.select() does not seem to work. var item = sender.findItemByText(sender.get_text()); however is finding the correct item.


Any help here would be great.  I don't think what I am trying to do is a crazy scenario.  I think this is a common auto complete.

<script type="text/javascript">
    var ent = false
       
    function DetectEnter(sender, eventArgs) 
    
        var keyCode = eventArgs._domEvent.keyCode; 
           
        if (keyCode == 13) 
        {
            ent = true;
            var item = sender.findItemByText(sender.get_text());
            if (item) {
                item.select();
                ent = false;
            }
        
        else 
        
           ent = false
        
    
 
    function CheckEnter(sender, eventArgs) 
    {
        var combo = $find("<%= _SymbolLookup.ClientID %>"); 
         
        combo.hideDropDown(); 
        var temp = ent;
        ent = false;
        eventArgs.set_cancel(temp); 
    
</script>

<telerik:RadComboBox ID="_SymbolLookup" runat="server" AllowCustomText="true" Filter="StartsWith"
    DataTextField="ContactName" EnableLoadOnDemand="True" ShowMoreResultsBox="True"
    EmptyMessage="Type to search for symbol..." OnSelectedIndexChanged="_SymbolLookup_SelectedIndexChanged"
    OnItemsRequested="SymbolLookup_OnItemsRequested" DropDownWidth="525px" Width="200px"
    HighlightTemplatedItems="true" AutoPostBack="true" OnClientKeyPressing="DetectEnter"
    OnClientSelectedIndexChanging="CheckEnter">
    <HeaderTemplate>
        <table width="500px" cellspacing="0" cellpadding="0">
            <tr>
                <td style="width: 50px;">
                    Symbol
                </td>
                <td style="width: 375px;">
                    Name
                </td>
                <td style="width: 75px;">
                    Status
                </td>
            </tr>
        </table>
    </HeaderTemplate>
    <ItemTemplate>
        <table width="500px" cellspacing="0" cellpadding="0">
            <tr>
                <td style="width: 50px;">
                    <%# DataBinder.Eval(Container, "Attributes['Symbol']")%>
                </td>
                <td style="width: 375px; overflow: hidden;">
                    <%# DataBinder.Eval(Container, "Attributes['Instrument_Name']")%>
                </td>
                <td style="width: 75px;">
                    <%# DataBinder.Eval(Container, "Attributes['Status']") %>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>
Simon
Telerik team
 answered on 09 Nov 2010
2 answers
81 views
For several hours this after I was getting an error in IE8. It was the infamous red screen of death proclaiming "this website has been reported as unsafe".

The cause of this error was the telerik:RadTreeView tag. As soon as I removed the tag, the error went away. Did anyone else notice this behaviour? Code below.

  <script type="text/javascript">
            //<!--
                function onClientContextMenuItemClicked(sender, args)
                {
                    var menuItem = args.get_menuItem();
                    var treeNode = args.get_node();

                    switch(menuItem.get_value())
                    {
                        case "Edit":
                            var wnd = location.href='/admin/content_category_details_self.aspx?CategoryID=' + treeNode.get_value();
                            wnd.setSize(800,500);
                            break;
                        case "Add":
                            var wnd = location.href='/admin/content_category_details_self.aspx?CategoryID=0&ParentID=' + treeNode.get_value();
                            wnd.setSize(800,500);
                            break;
                        case "Sort":
                            OpenOverlay('/admin/content_category_sort.aspx?CategoryID=' + treeNode.get_value(),600,400);
                           break;
                    }
                }
            //-->
            </script>


<telerik:RadTreeView Skin="Outlook" ID="RadTree1" OnClientContextMenuItemClicked="onClientContextMenuItemClicked" Runat="server">
          <ContextMenus>
            <telerik:RadTreeViewContextMenu Skin="Outlook" ID="MainContextMenu" runat="server">
              <Items>
                <telerik:RadMenuItem Value="Edit" Text="Edit"></telerik:RadMenuItem>
                <telerik:RadMenuItem Value="Add" Text="Add Subcategory"></telerik:RadMenuItem>
                <telerik:RadMenuItem Value="Sort" Text="Sort"></telerik:RadMenuItem>
              </Items>
            </telerik:RadTreeViewContextMenu>
          </ContextMenus>
        </telerik:RadTreeView> 
Julian Roberts
Top achievements
Rank 1
 answered on 09 Nov 2010
1 answer
179 views
Hello All,

I have to use the RAD Filter on the DataSource at place of the current view of the grid. and this I am doing with the RAD Filter for DataSource.
But my problem is that the I want to fetch the  "Filter Expression" generated by the  RADFilter ; and make it convert in to the XML format.

For example:
<FilterExpression>
<Expression1>
<DataFiledName>EmployeID</DataFiledName>
<Operator>=</Operator>
<DataFiledValue>1</DataFiledValue>
</Expression1>
<Expression2>
<DataFiledName>DepartmentName</DataFiledName>
<Operator>Like</Operator>
<DataFiledValue>Finance</DataFiledValue>
</Expression2>
</FilterExpression>

Please Help me to do the same....

Thanks in Advance!!!
Tsvetina
Telerik team
 answered on 09 Nov 2010
1 answer
1.0K+ views
Greetings

Is there any way make me able to access Parent Page Methods from RadWindow?

Thanks in Advance
Shinu
Top achievements
Rank 2
 answered on 09 Nov 2010
13 answers
234 views
Hi Telerik,

We have MOSS 2007 and IE8, and are currently testing RadEditor 5.8.0.0.

I understand that the cellpadding attribute does not apply in design view, because it gets overriden by RadEditor styles.

I followed the article on http://www.telerik.com/support/kb/aspnet-ajax/editor/cellpadding-and-cellspacing-do-not-apply-in-design-mode.aspx, by creating a css file called EditorContentAreaStyles.css in the Resources folder.

The EditorContentAreaStyles.css file that I created consists of the following (without the padding):

/* _lcid="1033" _version="12.0.4518"
    _LocalBinding */

table
{
   BORDER-RIGHT: #999999 1px dashed;
   border-bottom: #999999 1px dashed;
}
table td
{
   border-top: #999999 1px dashed;
   BORDER-LEFT: #999999 1px dashed;
}
table th
{
   border-top: #000000 1px dashed;
   BORDER-LEFT: #000000 1px dashed;
}


Then in the ConfigFile.xml, I added the following property:

<property name="ContentAreaCssFile">
              <item>/_wpresources/RadEditorSharePoint/5.8.0.0__1f131a624888eeed/Resources/EditorContentAreaStyles.css</item>
</property>

However, still, after this change, whenever cell padding is defined in the Table Properties tab, it is not applied in design view, nor is applied once I check-in or publish the page. Am I missing something?

Thanks,
Claudz
Stanimir
Telerik team
 answered on 09 Nov 2010
2 answers
57 views
Hi all,
I would like to extend the hours from 18:00 to 21:00 on combo Start Time and End Time in the advanced form
Is possible?
Thanks a lot
Fabrizio
fabrizio
Top achievements
Rank 2
Iron
Veteran
 answered on 09 Nov 2010
2 answers
140 views
I have a page:  Site.aspx?SiteID=1

The page has Load event:
If Request.QueryString("SiteID") <> "" Then
           ' Load based on SiteID
           Dim RequestedSiteID As String = Request.QueryString("SiteID")
           If IsNumeric(RequestedSiteID) Then
               Dim dbEntity As WebsiteEntities = New WebsiteEntities
 
               Dim query = (From PWPaperwork In dbEntity.PWPaperworks Where PWPaperwork.Site_ID = RequestedSiteID Select PWPaperwork)
               PaperworkGrid.DataSource = query
           End If
     Else
           Response.Redirect("Sites.aspx")
End If

This loads the Grid with just records from the SiteID querystring.

The Grid has an EditForm which used to update correctly. I added the Querystring identifier and the UpdateCommand does not rebind with the new data from the database. Only after pressing F5 will I see the changes made via the EditForm/UpdateCommand.

Is there something I should be doing with the grid PreRender? I have looked :
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx

And It does not help me in my scenario.

Any ideas or suggestions to pass QueryString variables to the SQL which in turn fills the grid BUT still works with an EditForm?

Thankyou!
Radoslav
Telerik team
 answered on 09 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?