protected void RadGrid_Details_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e) { var Value= e.DetailTableView.ParentItem; string ID = Value.GetDataKeyValue("ID").ToString(); e.DetailTableView.DataSource = GetDataTable("SELECT * FROM databsename WHERE ID = '" + ID + "'"); } public DataTable GetDataTable(string query) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString()); SqlDataAdapter da = new SqlDataAdapter("select * from databasename ", con); DataSet ds = new DataSet(); da.Fill(ds, "databasename"); RadGrid_Details.DataSource = ds; DataTable myDataTable = new DataTable(); con.Open(); da.Fill(myDataTable); return myDataTable; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)