Anyone,
I am using a RadGrid that contains one DetailTable as in the below code. I am binding the datasource for the grid in the NeedDataSource Event (need to do this way). I need to Expand all the items to show up the details table, on the page load (first time load); i am not sure when to expand the items. I tried doing it on the NeedDataSource event, but it doesn't work.
Please note: I have a asp button on the page for collapsing all the grid items. So i am unable to use the PreRender event as well.
Can someone please suggest how do i go about this scenario?
I am using a RadGrid that contains one DetailTable as in the below code. I am binding the datasource for the grid in the NeedDataSource Event (need to do this way). I need to Expand all the items to show up the details table, on the page load (first time load); i am not sure when to expand the items. I tried doing it on the NeedDataSource event, but it doesn't work.
Please note: I have a asp button on the page for collapsing all the grid items. So i am unable to use the PreRender event as well.
Can someone please suggest how do i go about this scenario?
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="False" AllowMultiRowSelection="False" AllowPaging="False" OnNeedDataSource="RadGrid1_NeedDataSource" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" Skin="Default"> <MasterTableView DataKeyNames="col1" ExpandCollapseColumn-ButtonType="PushButton"> <DetailTables> <telerik:GridTableView Name="detailGrid" Width="95%" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center"> <Columns> <telerik:GridBoundColumn HeaderText="col1" HeaderButtonType="TextButton" DataField="col1" /> <telerik:GridBoundColumn HeaderText="col2" HeaderButtonType="TextButton" DataField="col2" /> </Columns> </telerik:GridTableView> </DetailTables> <Columns>.....