- Home
- Forum
- ASP.NET MVC
- allow editting some columns
allow editting some columns
For your kind information, we can cancel the editing for particular fields in TreeGrid with the help of “BeginEdit” client side event. Please refer the below code snippet to cancel the editing for particular column.
|
@ (Html.EJ ().TreeGrid ("TreeGridContainer"). EditSettings(eve => { eve.AllowEditing(true); eve.AllowAdding(true); eve.AllowDeleting(true); eve.EditMode(TreeGridEditMode.CellEditing); }). ClientSideEvents(eve=>{ eve.BeginEdit("beginEdit"); }). //... )
<script type="text/javascript"> function beginEdit(args) { var treeObj = $("#TreeGridContainer").data("ejTreeGrid"); var columns = treeObj.model.columns; //cancelling editing for 'StartDate' column and 'PercentDone' column if (columns[args.columnIndex].field == "StartDate" || columns[args.columnIndex].field == "PercentDone") args.cancel = true; } </script> |
We have also prepared a sample prepared a sample based on this and you can find the sample under the following location
Sample: http://www.syncfusion.com/downloads/support/forum/119650/ze/CellEditing202526131
Also currently there is no support to cancel editing a row for editMode as “RowEditing”. We have also logged an improvement task to cancel editing the row in “RowEditing” mode.
A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Regards,
Mahalakshmi K.
Attachment: HZ20150720_dbf3953.rar
Hi Harry,
Sorry for the inconvience caused.
We can also reproduce the issue while disabling edit icon in the toolbar and enabling the cellEditing in TreeGrid. A support incident has been created under your account to track the status of this issue report. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Regards,
Mahalakshmi K.
- 3 Replies
- 2 Participants
-
HZ Harry Zheng
- Jul 17, 2015 04:04 PM UTC
- Jul 21, 2015 12:50 PM UTC