I'm using details table on radgrid.Row select is not working for details table only when i set HierarchyLoadMode="ServerOnDemand".Please Help me to out of this.
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
GridLines
=
"None"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
OnDetailTableDataBind
=
"RadGrid1_2Bind"
OnItemDataBound
=
"RadGrid1_OnDataBound"
OnPreRender
=
"RadGrid1_OnPreRender"
<HeaderStyle
CssClass
=
"RadGridHeader"
/>
<
ExportSettings
ExportOnlyData
=
"true"
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
/>
<
ClientSettings
AllowColumnsReorder
=
"True"
ReorderColumnsOnClient
=
"True"
>
<
ClientEvents
OnRowDblClick
=
"RowDblClicked"
/>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
AutoGenerateColumns
=
"False"
HierarchyLoadMode
=
"ServerOnDemand"
ShowHeadersWhenNoRecords
=
"false"
NoDetailRecordsText
=
""
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
ShowAddNewRecordButton
=
"False"
ShowExportToExcelButton
=
"True"
ShowExportToPdfButton
=
"True"
ShowExportToWordButton
=
"True"
ShowRefreshButton
=
"False"
/>
<
DetailTables
>
<
telerik:GridTableView
runat
=
"server"
Name
=
"RedGrid_2"
AllowPaging
=
"true"
AutoGenerateColumns
=
"False"
NoMasterRecordsText
=
""
PageSize
=
"10"
Width
=
"100%"
>
<
Columns
>
<
telerik:GridBoundColumn
SortExpression
=
"SupplierName"
HeaderText
=
"Supplier Name"
DataField
=
"SupplierName"
>
<
telerik:GridTemplateColumn
HeaderText
=
"DM"
SortExpression
=
"DMetrix"
DataType
=
"System.String"
UniqueName
=
"DM"
ItemStyle-HorizontalAlign
=
"Center"
>
<
ItemTemplate
>
<
a
><%# ((Int32)(DataBinder.Eval(Container.DataItem, "DMetrix")) == -2) ? ("--") : DataBinder.Eval(Container.DataItem, "DMetrix")%></
a
>
</
ItemTemplate
>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ID"
HeaderText
=
"ID"
SortExpression
=
"ID"
UniqueName
=
"ID"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<%-- <
telerik:GridBoundColumn
DataField
=
"Name"
HeaderText
=
"Name"
SortExpression
=
"Name"
UniqueName
=
"Name"
ItemStyle-HorizontalAlign
=
"Center"
HeaderStyle-HorizontalAlign
=
"Center"
>
</
telerik:GridBoundColumn
>--%>
<
telerik:GridTemplateColumn
HeaderText
=
""
UniqueName
=
"UpANDDown"
ItemStyle-HorizontalAlign
=
"Center"
HeaderStyle-HorizontalAlign
=
"Center"
>
<
itemtemplate
>
<
asp:ImageButton
ID
=
"btnUp"
runat
=
"server"
OnClick
=
"btnUp_Click"
ImageUrl
=
"images/UP_Arrow_Icon.png"
CommandName
=
"UP"
/>
<
asp:ImageButton
ID
=
"btnDown"
runat
=
"server"
OnClick
=
"btnDown_Click"
ImageUrl
=
"images/DOWN_Arrow_Icon.png"
CommandName
=
"DOWN"
/>
</
itemtemplate
>
<
itemstyle
horizontalalign
=
"Center"
></
itemstyle
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Field Quota"
SortExpression
=
"FieldQuota"
UniqueName
=
"FieldQuota"
ItemStyle-HorizontalAlign
=
"Center"
>
<
ItemTemplate
>
<
asp:TextBox
ID
=
"tbFieldQuota"
runat
=
"server"
Text='<%# Bind("FieldQuota") %>' ToolTip="Enter Numeric Value"
Width="50px" MaxLength="5" OnTextChanged="UpdateFieldQuotaInGrid" AutoPostBack="true"></
asp:TextBox
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Order"
HeaderText
=
"Order"
UniqueName
=
"IsLock"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
ContentTemplate
>
protected
void
RadGrid1_2Bind(
object
source, GridDetailTableDataBindEventArgs e)
{
try
{
GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
if
(e.DetailTableView.Name ==
" RadGrid1_2Bind"
)
{
string
parentHedgeRemaining = dataItem[
"ID"
].Text;
DataTable dt = GetDatatabe();
e.DetailTableView.DataSource = dt;
}
else
{
e.DetailTableView.DataSource =
null
;
}
}
catch
(Exception ex)
{
}
}