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.
Syncfusion Feedback

GGC Selection

Thread ID:

Created:

Updated:

Platform:

Replies:

39624 Jan 13,2006 04:56 AM UTC Jan 13,2006 06:02 PM UTC Windows Forms 1
loading
Tags: GridControl
prethi
Asked On January 13, 2006 04:56 AM UTC

Hi Iam using GGC.I''ve 10 records inthe grid with one of the field as boolean.I want to make the records which are true to read only.ie,in the same grid 5 records should be readonly & 5 should be editable.How can I do this? Thanks

stanleyj [Syncfusion]
Replied On January 13, 2006 06:02 PM UTC

Hi Preethi, By handling the QueryCellStyleInfo event, the styles of the row can be changed. Here is a sample. private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.Column != null && e.TableCellIdentity.DisplayElement is GridRecordRow) { DataRowView dr = e.TableCellIdentity.DisplayElement.ParentRecord.GetData() as DataRowView; if(dr!=null && Convert.ToBoolean(dr["Col3"])) { Console.WriteLine("reached"); e.Style.BackColor=Color.Turquoise; e.Style.ReadOnly=true; } } } Best regards, Stanley

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.

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

;