I am new to the grid control and am trying to understand how to setup and use the control to fulfill my requirements. I have a grid that has 3 columns. The grid has the CellEditing behavior setup where two of the columns use Dropdown EditorProviders. My 3rd column contains a boolean value that also needs to be editable.
var grid = $find("<%= WebDataGrid1.ClientID %>");
// Get active row
var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row();
I receive an error: 'get_behaviors().get_activation()' is null or not an object.
What am I doing wrong? Am I using the wrong event is there a better way of doing this? Also, is there a check box editor provider?
First I'll check that you are using the WebDataGrid (for flat data) and not the new WebHierarchicalDataGrid. Assuming the former, var activation = grid.get_behaviors().get_activation() is correct. If you were to use the hierarchical one, you'd need var activation = grid.get_gridView().get_behaviors().get_activation()
Now, do you have activation in your behaviors collection and turned on? One of those must be false for you to get null returned. If you can't get it, attach your grid definition here.
And to answer your last question, there is no available check box editor provider currently. You could implement your own if you desired. Another option would be to listen to the changed event of the checkbox and use that to set the value of the cell.
Thanks for the reply. I hadn't turned on the activation behavior.
I turned it on and it worked.