This content has been marked as final. Show 3 replies
Should I be creating a subclass of AdvancedDataGridItemRenderer?
That is the hard way. You could specify that the column is editable, then in an itemEditBeginning handler, perform your logic, and if an edit is not allowed, call event.preventDefault();
Here is a link to a somewhat complex example:
Originally posted by: ntsiii
You could specify that the column is editable, then in an itemEditBeginning handler, perform your logic, and if an edit is not allowed, call event.preventDefault();
Tracy, that was a big help. I set up an event handler for ITEM_EDIT_BEGINNING.
Unfortunately, I had some problems to work around. I'm using an AdvancedDataGrid, not a DataGrid. In the event handler, the selectedItem property was null and the selectedData was some untyped Object that had no content whatsoever, so I had to go on a hunt to find out which row of my XML data was selected. Since this is an AdvancedDataGrid and I was using grouping, I couldn't look at the row index because the grouping rows prevent an easy mapping from the row index into the XML data.
I was finally able to find the selected data using the item renderer: event.itemRenderer.data.
Problem is solved.
I wonder if it is a bug that selectedItem and selectedData were useless, or if that is for some reason intended functionality.
Thanks for your help.