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.

QueryCellStyleInfo and multiple tables

Thread ID:

Created:

Updated:

Platform:

Replies:

33420 Aug 19,2005 06:02 AM Aug 19,2005 07:47 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 19, 2005 06:02 AM

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 07:11 AM

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

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

Thanks - this was the solution

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.

;