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

PrepareViewStyleInfo event for GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

40419 Feb 2,2006 01:35 PM UTC Mar 31,2006 06:16 AM UTC WinForms 8
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 2, 2006 01:35 PM UTC

Hi, to influence the style of a cell immediately before the cell is drawn I can handle the PrepareViewStyleInfo event for GDBG. Is there any similar event for gridGroupingControl? Is there an event raised when the datasource has changed for ggc and gdbg? thx, Klaus

stanleyj [Syncfusion]
Replied On February 2, 2006 02:10 PM UTC

Hi Klaus, GGC also has PrepareViewStyleInfo as TableControlPrepareViewStyleInfo, you may also try QueryCellStyleInfo for better results. The events you are looking for GDBG is Binder.DataSourceChanged. Try TableSourceListChanged for GGC. Best regards, Stanley

Administrator [Syncfusion]
Replied On February 3, 2006 07:36 AM UTC

Hi Stanley, thank you for your fast answers all the time. TableControlPrepareViewStyleInfo for GGC works fine but can you give me a hint how to access the currently drawn GridRecordRow from the given GridTableControlPrepareViewStyleInfoEventArgs. I have no idea how to use e.Inner.ColIndex and e.Inner.RowIndex to get the Record. I think there is a general leak in my understanding of how Table, TableDescriptor, TableModel and TableControl works together in GGC. Is there a document where this is described? thx, Klaus >Hi Klaus, > >GGC also has PrepareViewStyleInfo as TableControlPrepareViewStyleInfo, you may also try QueryCellStyleInfo for better results. > >The events you are looking for GDBG is Binder.DataSourceChanged. Try TableSourceListChanged for GGC. > >Best regards, >Stanley >

stanleyj [Syncfusion]
Replied On February 3, 2006 11:37 AM UTC

Hi Klaus, Thanks for all your feedbacks. There are couple of forums on this related task. Refer this KB article to get an idea. You can search the forum section with ''PrepareViewStyleInfo AND grouping'' or ''PrepareViewStyleInfo AND GGC'' to get related results. >>I think there is a general leak in my understanding of how Table, TableDescriptor, TableModel and TableControl works together in GGC. Is there a document where this is described? There are no separate document on these now, We will work on explaining these and update appropriately in the KB section. Thanks and regards, Stanley

resmi
Replied On March 29, 2006 01:13 PM UTC

hi By using TableControlPrepareViewStyleInfo Iam changing the style according to some condition.But for one column I dont want to apply the style.Is it possible

Administrator [Syncfusion]
Replied On March 29, 2006 01:58 PM UTC

Hi, Try the below code to get the column name in the TableControlPrepareViewStyleInfo event. Rectangle rect = e.TableControl.RangeInfoToRectangle(GridRangeInfo.Cell(e.Inner.RowIndex,e.Inner.ColIndex)); GridTableCellStyleInfo style = e.TableControl.PointToTableCellStyle(new Point(rect.X,rect.Y)); if(style.TableCellIdentity.Column != null ) Console.WriteLine(style.TableCellIdentity.Column); Regards, Calvin.

resmi
Replied On March 30, 2006 05:30 AM UTC

this will give me only the column name.i want that column say ''name'',not to apply any changes,but the other columns with records should apply changes

Administrator [Syncfusion]
Replied On March 30, 2006 10:44 AM UTC

Hi, Please try this code snippet and let us know if this helps to resolve the issue. private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e) { // Record r = e.TableControl.Table.CurrentRecord; // int rowindex = e.TableControl.Table.DisplayElements.IndexOf(r); int colindex = this.gridGroupingControl1.TableModel.NameToColIndex("Integer"); if(!(colindex == e.Inner.ColIndex))// && e.Inner.RowIndex == rowindex) e.Inner.Style.BackColor = Color.Red; } Best regards, Madhan

Administrator [Syncfusion]
Replied On March 31, 2006 06:16 AM UTC

thanks

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

;