Hi MuthuKumar,
Thanks for your quick response.
Actually the actual scenario is different than given sample application, based on the single row data change, all grid data is recalculated on server side and all row data is again pulled from server, and tree grid data is re-render as fresh view.
So in such scenario-How to preserve the state? Please let me know if i am still not clear.
private void TreeGrid_Loaded(object sender, RoutedEventArgs e)
{
// to get the rootnode of Grid treeControl
var rootnode = this.treeGrid.InternalGrid.RootNodes[0];
// whether the root node is expanded/no
var rootexpanded = rootnode.Expanded;
// to get the childnode of 1st child
var childnode = this.treeGrid.InternalGrid.RootNodes[0].ChildNodes[0];
var childnodeexpanded = childnode.Expanded;
//to get the childnodes of 1st parent node
var childnodes = this.treeGrid.InternalGrid.RootNodes[0].ChildNodes;
} |
private void TreeGrid_Loaded(object sender, RoutedEventArgs e)
{
// to get the view root node of treeGrid
var rootnode = this.treeGrid.View.Nodes[0];
// whether the root node is expanded or not, if root node is not expanded, then it will expand using ExpandNode() method.
if (!rootnode.IsExpanded)
this.treeGrid.ExpandNode(rootnode);
//to get the childnode
var childnode = this.treeGrid.View.Nodes[0].ChildNodes[0];
// to check and expand the childnode
if (!childnode.IsExpanded)
this.treeGrid.ExpandNode(childnode);
} |