I Have attached Sceen Shot for my problems.Give correct solutions or please progrmatical how to create this..give sample..code..
I give that Code Below..in detail bind..
protected void rdReport_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
#region Child
string columnname = Session["ColumnNam"].ToString();
string ReportId = Session["ReportId"].ToString();
string mapping = Session["MappingField"].ToString();
string Column = columnname.TrimEnd(',');
string tablename = TableName(ReportId);
#endregion
#region SubChild
string ChildColumnName = Session["ChildColumnNam"].ToString();
string ChildReportId = Session["ChildReport_Id"].ToString();
string ChildMapping = Session["ChildMapping_Field"].ToString();
string ChildColumn = ChildColumnName.TrimEnd(',');
string Childtablename = TableName(ChildReportId);
#endregion
switch (e.DetailTableView.Name)
{
case "Child":
{
string DataKeyNames = dataItem.GetDataKeyValue(mapping).ToString();
string query = "select " + Column + " from [" + tablename + "] WHERE " + mapping + " ='" + DataKeyNames + "'";
e.DetailTableView.DataSource = GetDataTable(query);
break;
}
case "SubChild":
{
string Query = "select " + ChildColumn + " from [" + Childtablename + "] WHERE " + ChildMapping + " = '" + dataItem[ChildMapping].Text + "'";
e.DetailTableView.DataSource = GetDataTable(Query);
break;
}
}
}
With Regards.
S.Kannadasan