I have 2 RadGrids on the page one above the other
I use data entity for data source and The first RadGrid data source is this
protected void RadGrid1_NeedDataSource(object sender, Web.UI.GridNeedDataSourceEventArgs e) { var result = from r in DbContext.LinkAnalysis where r.LinkAnalysisCreator == dbuser select r; RadGrid1.DataSource = result.ToList(); }The second Rad Grid Data source is this
protected void SubjectRadGrid_NeedDataSource(object sender, Web.UI.GridNeedDataSourceEventArgs e) { var results = from r in DbContext.Subjects where r.LinkAnalysisId == linkId select r; SubjectRadGrid.DataSource = results.ToList(); }When the page first loads the SubjectRadGrid shows no records. This is okay but when a user clocks on one of the row in the RadGrid1 I want SubjectRadGrid to display the child objects for the selected row.
I obtain the "linkId" variable for the second RadGrid using this code
public void RadGrid1_SelectedIndexChanged(object sender, EventArgs e) { GridDataItem item = (GridDataItem)RadGrid1.SelectedItems[0]; string ID = RadGrid1.SelectedValue.ToString();//Retrieving primary key field values for selected items linkId = Convert.ToInt16(ID); SubjectRadGrid.Rebind(); }This works works and if I place a break point in the SubjectRadGrid_NeedDataSource code I can see the data, during the Rebind, I need is being pulled. But no data still does not show up in the SubjectRadGrid.
What am I missing here?
