Hello,
I'm trying to create a solution similiar to the Master/Detail demo.
I have 2 grids on a single page, MasterGrid and DetailsGrid.
I have AllowRowSelect="true" in MasterGrid and that works fine.
My problem is that I need to get the selected DataKeyValue (of MasterGrid) from within the DetailsGrid_NeedDataSource as a parameter value.
I can get the DataKeyValue from within a grids own GridCommand event, something like:
But again, I can't get the value in an unrelated method (NeedDataSource of a different grid).
Any assistance is appreciated.
Thank you,
Ronnie
I'm trying to create a solution similiar to the Master/Detail demo.
I have 2 grids on a single page, MasterGrid and DetailsGrid.
I have AllowRowSelect="true" in MasterGrid and that works fine.
My problem is that I need to get the selected DataKeyValue (of MasterGrid) from within the DetailsGrid_NeedDataSource as a parameter value.
I can get the DataKeyValue from within a grids own GridCommand event, something like:
protected
void
MasterGrid_DeleteCommand(
object
source, GridCommandEventArgs e)
{
GridDataItem dataItem = (GridDataItem)e.Item;
int
id = Convert.ToInt32(dataItem.GetDataKeyValue(
"ID"
));
}
But again, I can't get the value in an unrelated method (NeedDataSource of a different grid).
Any assistance is appreciated.
Thank you,
Ronnie