JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Grid ediable cells yes or not › Reply To: Grid ediable cells yes or not
October 18, 2021 at 1:56 pm
#102423
Participant
The functionality that you need is easily achievable with the allowEdit
property of the columns.
A quick code snippet on how to disable the editing of some columns:
columns: [
{ label: 'First Name', dataField: 'firstName', allowEdit: false },
<div>
<div>{ label: 'Last Name', dataField: 'lastName', allowEdit: false },</div>
<div>{ label: 'Product', dataField: 'productName' },</div>
<div>{ label: 'Available', dataField: 'available', template: 'checkBox', editor: 'checkBox' },</div>
<div>{ label: 'Quantity', dataField: 'quantity', editor: 'numberInput' },</div>
<div>{ label: 'Unit Price', dataField: 'price', editor: 'numberInput', cellsFormat: 'c2' }</div>
<div>
]
Let me know if this works for you!
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/
</div>
</div>
</div>
-
This reply was modified 2 years, 10 months ago by
Yavor Dashev.