We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Checkboxes in MVC grid

Hi,

I want to have a checkbox in a grid. When I click on my checkbox to edit it becomes "false". I want to set a cross. Please provide a example according to 



.Edit(new { @params = new { checked=false } })
Doesnt seem to work. 
Thx.

3 Replies

HJ Hariharan J V Syncfusion Team May 20, 2019 01:53 AM

Hi Andreas, 
  
Thanks for contacting Syncfusion support. 
  
We suspect that you want to change the “false” text while editing the checkbox column. So we suggest to set column editType as “booleanedit” to achieve this requirement. Please refer the following code snippet, 
  
col.Field("Boolean").DisplayAsCheckBox(true).EditType("booleanedit").Width("120").Add(); 
  
If we misunderstood your query please share more details about your requirement. This will help us to provide the better solution for your requirement as early as possible. 
  
Regards, 
Hariharan 



AN Andreas May 20, 2019 02:45 AM

Thank you. Can u please update documentation. Documentation is misisng this:

Cell edit type and its params

The EditType of Column is used to define the editor component for any particular column.

You can set the EditType based on data type of the column.

  • NumericTextBox component for integers, double, and decimal data types.

  • TextBox component for string data type.

  • DropDownList component to show all unique values related to that field.

  • CheckBox component for boolean data type.

  • DatePicker component for date data type.

  • DateTimePicker component for date time data type.



HJ Hariharan J V Syncfusion Team May 22, 2019 08:16 AM

Hi Andreas,

Thanks for your suggestion, we have already logged documentation task for this and it will be refreshed online in any of our upcoming documentation release.

Regards,
Hariharan

Loader.
Live Chat Icon For mobile
Up arrow icon