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

Adding diff column types to same column for diff rows

5 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 15 May 2013, 01:43 AM
Hi,

I have tried to get the answer to this critical question (for me) but I probably have not stated the question properly.....How do I get a different drop down list in different rows of the same column?  The Below grid example is what i need to do.  The example below is only for descriptive purposes to visually depict what I have not been able to verbally explain.  A simple working example would be greatly appreciated.

Thanks
Rich

Row No Month Column Sales Column
1 Drop Down Combo box 100.00
January
February
March

2 Drop Down Combo box 120.00
April
May
June

3 Drop Down Combo Box  80.00
July
August
September

etc.

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 15 May 2013, 07:20 AM
Hi,

You should define the Items for the GridViewComboBoxColumn as a collection for the business object (bound to the parent row) and then set the ItemsSourceBinding specifying it.
 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 15 May 2013, 04:02 PM
Hi Didie,

Would you please provide an example or a code snippet that shows how to do this.

Thanks
Rich 
0
Dimitrina
Telerik team
answered on 17 May 2013, 12:35 PM
Hello Rich,

For every data item (with row numbers 1, 2, 3, etc.), you should define and set a Months collection. Then specify it as ItemsSourceBinding for the column. You can check this help article for additional details.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 17 May 2013, 04:08 PM
Hi Didie,

On the 2nd example (Drivers), may I have the full source code so I can run it?

The document refers to 3 Current Driver collections.  How does each row bind to the correct driver collection?  Based on the ItemSource presented the DriverID column must be binding to the correct Drivers Collection based on the value of the TeamID column.  I don't understand how that actually happens.  Is this happening in some event?  What does the rest of the xaml for the RadGridView look like.

Thanks
Rich





0
Dimitrina
Telerik team
answered on 18 May 2013, 12:28 PM
Hello,

You can find attached a demo project showing how you can configure the ItemsSource for the GridViewComboBoxColumn per item level.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Richard Harrigan
Top achievements
Rank 1
Share this question
or