This is a migrated thread and some comments may be shown as answers.

LoadonDemand Grid with button

2 Answers 54 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Atlas
Top achievements
Rank 1
Atlas asked on 04 Aug 2009, 05:13 PM
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 Answers, 1 is accepted

Sort by
0
Atlas
Top achievements
Rank 1
answered on 04 Aug 2009, 09:00 PM
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.
0
Sebastian
Telerik team
answered on 07 Aug 2009, 02:15 PM
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.
Tags
TabStrip
Asked by
Atlas
Top achievements
Rank 1
Answers by
Atlas
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or