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,
We are using a grouping grid with combo boxes in it, our data source has 2 columns, a value member and a display member, we are doing it like this.
grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.CellType = "ComboBox";
grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.DataSource = dataTable;
grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.DisplayMember = strDisplayMember;
grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.ValueMember = strValueMember;
grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.ShowCurrentCellEditing;
my question is, how can we filter the dropdowns, to show subsets of the data source based on the group they fall within?
ADAdministrator Syncfusion Team February 16, 2005 10:21 AM UTC
You can try handling this.gridGroupingControl1.TableControlCurrentCellShowingDropDown and provide filtered DataSources to the droplist at that point. Here is a KB link that discusses this for GridDataBoundGrid, but I think something similar should work here as well.
http://www.syncfusion.com/Support/article.aspx?id=567
ADAdministrator Syncfusion Team March 1, 2005 03:36 AM UTC
from the example, it appears that it retrieve the key for the slave table using colindex (numeric). if i drag and change the order of the column, i will not be able to retrieve. how to i access using the column name instead?
ADAdministrator Syncfusion Team March 1, 2005 04:43 PM UTC
Try code like this to get an arbitray value in that event using a column name.
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo;
Record rec = style.TableCellIdentity.DisplayElement.ParentRecord as Record;
object someValue = rec.GetValue("SomeColumName");