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.
Unfortunately, activation email could not send to your email. Please try again.

Columns Readonly

Thread ID:





73315 Apr 30,2008 06:05 PM May 1,2008 05:41 AM Windows Forms 1
Tags: GridControl
Asked On April 30, 2008 06:05 PM


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 05:41 AM

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.

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.