I have a three level grid from which users may navigate to views and return to the grid. I want to put them back in the context they left. I'm really having trouble figuring out how to do this. I've been able to save the data-uid of an expanded row at the top level, but I can't seem to find it when the page loads after the user returns. Maybe I'm not subscribing to the correct event?
I've subscribed to
In onExpand I have
I think I want to get the row in onDataBound or possibly onDataBinding but can't get a handle on the desired row. I've looked a lots of examples that are ll different and none of them work for me.
Once I get the top level row expanded, then I'll need to do the same for the second and third levels. Can you give an example of how this is done? All the demos I've see so far are super simple and really don't seem to apply or don't give context as to which event is being subscribed to.
Thanks!
Rich
I've subscribed to
.Events(events => events.DataBound("onDataBound").DetailInit("onDetailInit").DetailExpand("onExpand").DetailCollapse("onCollapse"))
In onExpand I have
function onExpand(e) {
//alert('onExpand was called. BatchID = ' + e.masterRow.closest("tr.k-master-row").attr('data-uid'));
// save the data-uid value in the session
var selectedBatchID = e.masterRow.closest("tr.k-master-row").attr('data-uid')
$.post('@Url.Action("SetSessionVariable", "Home")',
{
key: 'lastSelectedBatchID',
value: selectedBatchID
});
}
I think I want to get the row in onDataBound or possibly onDataBinding but can't get a handle on the desired row. I've looked a lots of examples that are ll different and none of them work for me.
Once I get the top level row expanded, then I'll need to do the same for the second and third levels. Can you give an example of how this is done? All the demos I've see so far are super simple and really don't seem to apply or don't give context as to which event is being subscribed to.
Thanks!
Rich