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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Foreign keys in GridGorupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

17276 Aug 4,2004 11:39 PM UTC Aug 5,2004 11:54 AM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 4, 2004 11:39 PM UTC

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 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.

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

Perfect. Thanks.

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.

Warning Icon 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.Close Icon

;