I have a RadGrid displaying a hierarchical structure. I want to save the expand/collapse state of each item in the grid so that when the user returns to the site, everything looks exactly as they left it. I have code to save and restore the state of expanded/collapsed items, however, I now need a way to detect which item is currently being expanded/collapsed when the user clicks on the expand/collapse icon. I know there’s a command event, but there is no command argument nor does there seem to be any indication of which item’s state is being changed. Any ideas?
I have a RadGrid displaying a hierarchical structure. I want to save the expand/collapse
Share
I found that the GridCommandEventArgs passed into the RadGrid.ItemCommand event contains an ‘Item’ property that represents the item that was expanded/collapsed. If casted to a GridDataItem, one can retrieve the data key and do whatever manipulation is necessary.