GridDataControl

hi,

I have a GridDataControl

I want to make 10 rows of all rows to be ReadOnly, that can't be changed or edited.

how can I do that?


2 Replies

MA Manikandan Syncfusion Team March 1, 2011 02:30 PM UTC

Hi Mohammed,

Thanks for using Syncfusion Products.

Yes, You can set the all rows of GridDataControl as ReadOnly. You can achieve this by setting AllowEdit property of GridDataControl to False. We have prepared a sample based on this. Please find the sample in the attachment.

Code Snippet [C#]

this.dataGrid.AllowEdit=false;

Please let us know if you have queries.

Regards,
Manikandan J R.




CS_6753b1ef.zip


HR Habeeb Rahman Syncfusion Team March 4, 2011 06:58 AM UTC

Hi Mohammed,

Thanks for using Syncfusion Products.

Yes, you can set all rows of GridDataControl as ReadOnly by setting AllowEdit property of GridDataControl to False.

Code Snippet [C#]

this.dataGrid.AllowEdit=false;

And also you can set particular rows of all the rows as ReadOnly by the following code in QueryCellInfo event.

Code Snippet [C#]

this.dataGrid.Model[rowIndex, colIndex].ReadOnly = true;

Please let us know if this helps.

Regards,
Habeeb





ReadOnlyProperty_b460bde1.zip

Loader.
Up arrow icon