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

QueryCellStyleInfo and multiple tables

Thread ID:





33420 Aug 19,2005 10:02 AM UTC Aug 19,2005 11:47 AM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On August 19, 2005 10:02 AM UTC

Hi together, I have a dataset with to tables (e.g. "A" and "B"). Now I want to set for a special column in each table a special image. I have done something similar with only one table and the QueryCellStyleInfo event. Is it possible to manage this for multiple tables with a QueryCellStyleInfo event? For only one Table I used this event: private void gridGrouping_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { GridGroupingControl actControl = sender as GridGroupingControl; GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Style; if (style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell) { //&& (e.TableCellIdentity.TableCellType != GridTableCellType.AddNewRecordFieldCell) GridColumnDescriptor column = style.TableCellIdentity.Column; if (column.TableDescriptor.Columns.IndexOf(column) == 0) { GridRecordRow rec = actControl.Table.DisplayElements[e.TableCellIdentity.RowIndex] as GridRecordRow; if (rec != null) { DataRowView dr = rec.GetData() as DataRowView; if (dr != null && dr["Type"].Equals("Standard")) { e.Style.ImageIndex = 0; } } } } } How can this be done for multiple tables? Kind regards Markus

Administrator [Syncfusion]
Replied On August 19, 2005 11:11 AM UTC

You can test e.TableCellIdentity.Table.TableDescriptor.Name to see what table you are on.

Administrator [Syncfusion]
Replied On August 19, 2005 11:47 AM UTC

Thanks - this was the solution


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