I have setup an application according to this demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx
Now i am facing a problem.
I dont know how to fetch the DataKey from my mastertableview (parent item).
My Grid looks like:
-Parent A
-Child A
-Child B
-Parent B
In the nestedtableview under Parent A (holding Child A and Child B) i hit the new button thats in the command item template, and want to insert Child C. Now i dont know how to get the DataKeyValue from Parent A, so that i can set the correct relation in my code behind insert method.
Hope you guys can help me.
Update:
Some pseudo code for further explanation:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx
Now i am facing a problem.
I dont know how to fetch the DataKey from my mastertableview (parent item).
My Grid looks like:
-Parent A
-Child A
-Child B
-Parent B
In the nestedtableview under Parent A (holding Child A and Child B) i hit the new button thats in the command item template, and want to insert Child C. Now i dont know how to get the DataKeyValue from Parent A, so that i can set the correct relation in my code behind insert method.
Hope you guys can help me.
Update:
Some pseudo code for further explanation:
protected
void
paGrid_Insert(
object
source, GridCommandEventArgs e)
{
string
parentID = e.Item.ParentItem.DataKeyValues[
"PARENT_ID"
];
//SQL Insert Statement with the parentID to set Relation ...
}