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

GGC Selection

Thread ID:





39624 Jan 13,2006 04:56 AM UTC Jan 13,2006 06:02 PM UTC WinForms 1
Tags: GridControl
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


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