This is a migrated thread and some comments may be shown as answers.

Issue: GridView, Two LookupColumns and ParentChild Relationship

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 23 Mar 2010, 02:21 AM
I have 3 tables as below.
Terms   (TID, Tname)
TermConditions  (TCID ,  FK_TID,  TCName)
SelectedTermsAndConditions. (RowID,  FK_TID, FK_TCID , SomeDescription)

I have a dataset.xsd  and i have set relation between Terms and TermConditions tables. (Lets say name of Relation is "TTC") 

In a Winform, i have a grid whose datasource =  SelectedTermsAndConditions.
I added Two Lookup columns to display TName and TCName for FK_TID, FK_TCID colums respectively  
I  set  their datasource as below.
FK_TID.DataSource = Terms  
FK_TCID.DataSouce = Terms.TTC   (The Relation).

When the grid is displayed only for 1st row of SelectedTermsAndConditions I get TName and TCName  correctly.
From 2nd Row onwards TCName  remains null.
(Note when I try to edit,  both lookupcolumns as a dropdownbox appear to behave normally. meaning when i choose TName, it filters and displays child values in TCName lookupcolumn).   but somehow it looks like while displaying grid it is not able to get child values for each row.

Hoping my above explaination was clear to understand problem scenario.

-Lee.









1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 25 Mar 2010, 01:41 PM
Hi Lee,

Please check the relation data in your table objects and set up DisplayMember and ValueMember properties of RadGridView columns. For additional information about GridViewComboBoxColumn binding, refer to our online help.

Sincerely yours,
Julian Benkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Lee
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or