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

How to set ItemsSrouce of GridViewComboBoxColumn for each cell

1 Answer 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nagisa
Top achievements
Rank 1
Nagisa asked on 27 Feb 2012, 06:49 AM
Hi,

I had a issue that I want to set ItemsSource of GridViewComboBoxColumn for each cell , not each column.
Because the ItemsSource is determined by another property of entity binded to Row.

for example,
public class AEntity
{
    public string PropertyA { get; set;}
    public string ComboboxProperty { get; set;}
}

ComboboxProperty  will be binded to GridViewComboBoxColumn .
And there are two list for ItemsSrouce called ListA and ListB.

When PropertyA is setted by "ValueA". I want to set ListA into GridViewComboBoxColumn.ItemsSource, also display value of first entity in ListA  on to Cell.
And  when PropertyA is setted by "ValueB". I want to set ListB into GridViewComboBoxColumn.ItemsSource, and display value of first entity in ListB  on to Cell. 


Is there any way to resolve this problem? 

Best regards,
Niwa.

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 27 Feb 2012, 07:46 AM
Hello Nagisa,

You can try using ItemsSourceBinding of GridViewComboBoxColumn instead. Furthermore, I would recommend you to run through this blog post for a reference on how to achieve similar scenario like yours. 

All the best,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Nagisa
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or