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.

How do I make certain rows Readonly

Thread ID:

Created:

Updated:

Platform:

Replies:

77910 Nov 20,2008 10:08 AM Nov 21,2008 08:03 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 20, 2008 10:08 AM

Hi,

I am using DGBG and bind my grid to a dataset. How do I make certain rows as readonly?

Thanks in advance.

Raul


Rajadurai C [Syncfusion]
Replied On November 21, 2008 08:03 AM

Hi Raul,

Thanks for your interest in Syncfusion products.

To make certain rows Readonly, try handling QueryCellInfo event through the following code snippet.

this.gridDataBoundGrid1.Model.QueryCellInfo += new Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventHandler(Model_QueryCellInfo);

void Model_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 4 || e.RowIndex ==7||e.RowIndex ==10)
e.Style.ReadOnly = true;
}


This makes the rows 4,7,10 as readonly.

Regards,
Rajadurai


CONFIRMATION

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.

;