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.

Foreign keys in GridGorupingControl

Thread ID:





17276 Aug 4,2004 07:39 PM Aug 5,2004 07:54 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On August 4, 2004 07:39 PM

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

Administrator [Syncfusion]
Replied On August 5, 2004 01:42 AM

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.

Administrator [Syncfusion]
Replied On August 5, 2004 07:54 AM

Perfect. Thanks.


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.