Could someone give me an example of a nested grid using the NeedDataSource event that takes datakey from the parent grid? I don't want to use the SqlDatasource. Also where would I register this event? It seems that just setting the nested grids OnNeedDataSource attrib doesn't do it.
You could use the DetailTableDataBind event which fires when a table from DetailTablesCollection binds to a data source. You can pass the DataKeyValue to the query string to populate the detail table.
string strtxt = e.DetailTableView.ParentItem.GetDataKeyValue("EmployeeID").ToString(); // Where set the DataKeyNames of MasterTableView as EmployeeID
e.DetailTableView.DataSource = GetDataTable("SELECT EmployeeID,BirthDate, HireDate FROM Employees"+"WHERE EmployeeID='"+strtxt+"'"); //GetDataTable returns the DataTable according to query string passed