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

Displaying child row information in a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

10258 Jan 28,2004 01:46 AM UTC Jan 28,2004 09:04 PM UTC WinForms 6
loading
Tags: GridControl
simon
Asked On January 28, 2004 01:46 AM UTC

Lets say I have a ''parent'' table A: with cols x, y and z and a ''child table'' B with cols a, b, z A.z is a constraint to B.z I.e. table A owns the row in table B with a key of z I want to display in a grid the 4 columns A.x, A.y, B.a, B.b How can I do this? There is a similar example GDBGCombos which does somethign similar but I dont want a combobox. i just want to display the field. Also ideally I''d like to write a formatter for that column to display only 3 columns and concatenate B.a and B.b together. A.x, A.y, B.a + " is " + B.b How should I proceed?

Administrator [Syncfusion]
Replied On January 28, 2004 08:37 AM UTC

You can do this in QueryCellFormattedText. Here is a sample.

Administrator [Syncfusion]
Replied On January 28, 2004 07:03 PM UTC

Great, thanks a lot for creating this sample for me. I''ve got everything up and running as I want it. One related question though: is it possible to reference a child column in the DataMember using some kind of . notation ? i.e. gridColumn.Style.DataSource = ....; gridColumn.Style.CellType = "Static"; gridColumn.DataMember = "Customers.CustomerName"; gridColumn.DataValue = "customerID"; Now i know this particular example is probably not even logically complete but you get the idea of what i''m looking for. I seem to remember that .net grids can do something like this although it was never functionality i had a great need for so I am not certain. >You can do this in QueryCellFormattedText. Here is a sample. > >

Administrator [Syncfusion]
Replied On January 28, 2004 08:38 PM UTC

I think if you want to do this, then the style.DataSource would have to be the DataSet that held the Customers table and you would have to define the ValueMember using the same scheme.

Administrator [Syncfusion]
Replied On January 28, 2004 08:54 PM UTC

The .NET property i was implicitly replying to was DataColumn.Expression http://www.nedcomp.nl/support/origdocs/dotnetsdk/cpref/frlrfsystemdatadatacolumnclassexpressiontopic.htm?ntp=1 If there is no equivalent support in syncfusion then that fine, I already have what i want working but just wanted to make sure I hadnt missed the support if it was hiding somewhere.

Administrator [Syncfusion]
Replied On January 28, 2004 08:54 PM UTC

perhaps i should be looking at FormulaCells >The .NET property i was implicitly replying to was DataColumn.Expression > >http://www.nedcomp.nl/support/origdocs/dotnetsdk/cpref/frlrfsystemdatadatacolumnclassexpressiontopic.htm?ntp=1 > >If there is no equivalent support in syncfusion then that fine, I already have what i want working but just wanted to make sure I hadnt missed the support if it was hiding somewhere.

Administrator [Syncfusion]
Replied On January 28, 2004 09:04 PM UTC

You would add an expression column to the DataTable before you set the DataTable as the datasource for the combobox. Once you do this, then you can use the column name of the expression column as the DisplayMember for the combobox.

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

;