LoadonDemand Grid with button

3 posts, 0 answers
  1. Atlas
    Atlas avatar
    97 posts
    Member since:
    Jun 2009

    Posted 04 Aug 2009 Link to this post

    I used your TabStrip > Application Scenarios > LoadOnDemand example. I have a grid with an item_command that is being fired by a button in a user control, but the item command is never firing. How do I fix this?

    User Control:

                <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowSorting="true" 
                    ShowStatusBar="true" PageSize="25" AllowPaging="True" AutoGenerateColumns="False" 
                    AllowMultiRowSelection="false" OnPreRender="RadGrid1_PreRender" OnItemCommand="RadGrid1_ItemCommand">  
                    <PagerStyle Mode="NextPrevAndNumeric" /> 
                    <MasterTableView Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="False" DataKeyNames="ID">  
                        <Columns> 
                            <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false" /> 
                            <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/images/icon_page_magnify.gif" HeaderText="Select" UniqueName="Select" CommandName="Select" ItemStyle-Width="18px" ItemStyle-CssClass="cursorPointer" /> 
     
            protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
            {  
                if (e.CommandName.ToUpper() == "SELECT")  
                {  
                    int iID = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"]);  
                    DisplayDetails(iID);  
                }  
            }  
     
  2. Atlas
    Atlas avatar
    97 posts
    Member since:
    Jun 2009

    Posted 04 Aug 2009 Link to this post

    How do you bind a tab item to an aspx page so that the page can handle it's own postback events, without using a navigate url? I just want the tab content to be the page, sort of like an iFrame.
  3. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 07 Aug 2009 Link to this post

    Hello Nano,

    Can you please verify that you are using advanced binding with NeedDataSource event handling for your grid? This will ensure that features like filtering, grouping, custom edit forms, etc. will be supported and the grid events will be fired as expected.

    Best regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top