We need a grid in which the user can drag rows to reorder them, except for the first few rows, which must remain fixed.
I thought I'd figured out how to do this in OnRowSelecting, as described in this thread: http://www.telerik.com/community/forums/aspnet-ajax/grid/undraggable-rows.aspx
Unfortunately, that depends upon out setting Enabled=false in OnItemDataBound(). If the row is disabled, it can't be edited, and we need these rows to be editable, even if they can't be reordered.
I had thought that if I added a boolean column "isFixed" to the datasource, or a hidden GridBoundColumn to the grid, I'd be able to access one or the other in OnRowSelecting.
Unfortunately, element does not contain the hidden GridBoundColumn, so I can't access it. And get_dataItem() returns null.
Looking through your examples, the only ones that show get get_dataItem() being called are in OnRowDataBound().
Is there some way to access the underlying row data in OnRowSelecting()?
I thought I'd figured out how to do this in OnRowSelecting, as described in this thread: http://www.telerik.com/community/forums/aspnet-ajax/grid/undraggable-rows.aspx
Unfortunately, that depends upon out setting Enabled=false in OnItemDataBound(). If the row is disabled, it can't be edited, and we need these rows to be editable, even if they can't be reordered.
I had thought that if I added a boolean column "isFixed" to the datasource, or a hidden GridBoundColumn to the grid, I'd be able to access one or the other in OnRowSelecting.
function onRowSelecting(sender, args) { |
var item = args.get_gridDataItem(); |
var element = item.get_element(); |
var dataItem = item.get_dataItem(); |
} |
Unfortunately, element does not contain the hidden GridBoundColumn, so I can't access it. And get_dataItem() returns null.
Looking through your examples, the only ones that show get get_dataItem() being called are in OnRowDataBound().
Is there some way to access the underlying row data in OnRowSelecting()?