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

GridView w/ 2 Bound Lookup Columns where 2nd Column binding dependent on user selection in first column.

1 Answer 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Judy
Top achievements
Rank 1
Judy asked on 21 Oct 2008, 12:41 AM

I have a grid with two lookup columns; I’ll call them ColumnA and ColumnB.

ColumnA is always bound to a BindingSource which is populated based on criteria selected outside of the grid (a Company dropdown selection in this case).  This works fine.

 

Lookup ColumnB is bound to a different DataSource than ColumnA.  Its binding is based upon the user selection in ColumnA.  This needs to be done on a row by row basis.

 

In a nutshell, when the selected value in ColumnA changes, ColumnB needs to be re-bound.  How do I accomplish this?

Thanks much in advance!

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 24 Oct 2008, 09:03 AM
Hi Judy,

Thank you for contacting us.

You are able to change the DataSource for the whole ColumnB based on the selection in ColumnA. However, in this scenario, when you make a selection in a row of ColumnA and the DataSource should be changed for ColumnB, the display values in all the other rows of ColumnB will be changed according to the new DataSource.
I have demonstrated the approach in the sample project attached.

If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Judy
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or