The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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