how to make some columns not editable when adding a new row in treegrid

Hi,
I have a question about treegrid when adding a new row.
When user add a new row, I do not want them fill out all the columns. So user can only fill out some columns but not other columns. 
How can I achieve this?
Thank,

Harry 

1 Reply

JD Jayakumar Duraisamy Syncfusion Team November 2, 2015 12:33 PM UTC

Hi Harry,

We can disable specific columns from providing value during editing or adding a row by disabling the ‘AllowEditing’ property of the column object . And we have included this property in Essential studio release versoin volume 3 ,2015 . So we suggest you to upgrade to this Essential studio version .

You can download that setup from the below location

Download link: https://www.syncfusion.com/forums/120659/essential-studio-2015-volume-3-final-release-v13-3-0-7-is-available-for-download


Please find the below code example for more details,



.EditSettings(eve => {

        eve.AllowEditing(true);

        eve.EditMode(TreeGridEditMode.CellEditing);

    })

.Columns(co => {

        co.Field("StartDate").HeaderText("Start Date").AllowEditing(false).Add();

    })


We have also prepared a sample for disable the specific editable columns. Please find the sample in the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/120984/ze/TreeGridSample_MVC1910690808

Please let us know if you require further assistance on this.

Regards,
Jayakumar Duraisamy


Loader.
Up arrow icon