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

ComboBox selected item disappears when gridview is scrolled

4 Answers 165 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.
Surendra
Top achievements
Rank 1
Surendra asked on 24 May 2011, 08:13 AM
Hi,

I have a Silverlight RadGridview in which i have a cell which contains the RadComboBox, the celltemplate is as below,

 

<telerikGrid:GridViewDataColumn.CellTemplate>

 

<DataTemplate>
<telerikInput:RadComboBox Margin="2" VerticalAlignment="Center"

 

IsEditable="True" ItemsSource="{Binding SchoolGender}" 

 

SelectedItem="{Binding SelectedGender, Mode=TwoWay}">

 

</telerikInput:RadComboBox>

 

</DataTemplate> 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

I am trying to bind the ItemsSource to "SchoolGender" which is a ObservableCollection<string>. Also i am trying to bind the SelectedItem to "SelectedGender" which is a string property.

Issues:
1) The binding works fine for some rows and does not work for some rows.
2) When i scroll the grid using the vertical scroll bar, the selected item of the combobox becomes null.

Is this a known issue? Is there any workaround for this?

Regards
N.Surendra Prasad

 

 

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 24 May 2011, 10:51 AM
Hi Surendra,

 
You may take a look at the following forum thread that demonstrates how to define RadComboBox within GridViewColumn's CellTemplate, please follow this link. 



Greetings,
Vanya Pavlova
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
0
Surendra
Top achievements
Rank 1
answered on 24 May 2011, 12:48 PM
Hi Vanya,

The example solves my problem but raises another issue.

The problem is, whenever i scroll the grid, the SelectedGender property (which is bound to the SelectedValue of the ComboBox) is set for the number of records which are in the view, which is not an acceptable behaviour.

Is this a known issue? Please let me know the workaround for this.

Regards
N.Surendra Prasad
0
Yana
Telerik team
answered on 25 May 2011, 03:15 PM
Hi Surendra,

We're not aware of such an issue with RadGridView and SelectedValue property of RadComboBox. Can you please send us a simple project demonstrating the problem? Thanks in advance

Best wishes,
Yana
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
0
Surendra
Top achievements
Rank 1
answered on 26 May 2011, 12:26 PM
Hi Yana,

Yes, the problem persist. I will create a sample illustrating this, but currently i have other priorities to work on, i will send a sample whenever possible.

Regards
N.Surendra Prasad
Tags
GridView
Asked by
Surendra
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Surendra
Top achievements
Rank 1
Yana
Telerik team
Share this question
or