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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Columns Readonly

Thread ID:





73315 Apr 30,2008 10:05 PM UTC May 1,2008 09:41 AM UTC WinForms 1
Tags: GridControl
Asked On April 30, 2008 10:05 PM UTC


I am using DGBG, how do I make selected columns readonly.
I do not want to make the entire grid read only.


Jisha Joy [Syncfusion]
Replied On May 1, 2008 09:41 AM UTC

Hi Raul,

Thank you for posting query to us.

This can be achieved by handling the PrepareViewStyleInfo event and conditionally set ReadOnly to specific Columns.

Please refer the code:

this.gridDataBoundGrid1.PrepareViewStyleInfo += new Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventHandler(gridDataBoundGrid1_PrepareViewStyleInfo);

void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
if (e.ColIndex == 2 || e.ColIndex == 4)
e.Style.ReadOnly = true;



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon