Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
Checkbox Template Column
posted

Hi all,

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.

I created a TemplateDataField that contains a checkbox. The checkbox is disabled when the grid loads and I would like to enable it when the row is made editable. I am trying to use the EnteringEditMode event to do this, but I can't seem to get my javascript function to work correctly.

 

 

 

 

 

 

 

<script language="javascript" type="text/javascript">

function  activateTemplateControls()

{

 

 

var grid = $find("<%= WebDataGrid1.ClientID %>");

 

// Get active row

 

 

var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row();

 

 

}

 

 

</script>

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?

Thanks