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.
How do I display a forgeign value in a GridGroupingControl. This is what I''m trying, and I think it should work, but instead of the string (Name) from the "Foo" table, it just displays the Id (e.g., the values of the column "Type"):
GridColumnDescriptor gridcolumndescriptor = new GridColumnDescriptor();
gridcolumndescriptor.Name = "Type";
gridcolumndescriptor.HeaderText = "Foo";
gridcolumndescriptor.MappingName = "Type";
gridcolumndescriptor.ReadOnly = true;
gridcolumndescriptor.Width = 120;
FooTable foo = dataset.Foo;
if(_log.IsDebugEnabled) _log.Debug("Foo contains " + foo.Count); // display s 8
gridcolumndescriptor.Appearance.AnyRecordFieldCell.DataSource = foo; //Also tried "Foo"
gridcolumndescriptor.Appearance.AnyRecordFieldCell.ValueMember = "Id";
gridcolumndescriptor.Appearance.AnyRecordFieldCell.DisplayMember = "Name";
itemGrid.TableDescriptor.Columns.Add(gridcolumndescriptor);
Thank you,
dan
ADAdministrator Syncfusion Team August 5, 2004 05:42 AM UTC
Try also setting
gridcolumndescriptor.Appearance.AnyRecordFieldCell.CellType = "ComboBox";
If you do not want the see the combo button, set the .ShowButtons property to GridShowButtons.Hide.
Another thing to check is "Id" and "Name" are case sensitive, so they need to be exact.
ADAdministrator Syncfusion Team August 5, 2004 11:54 AM UTC