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

selected values not visible in GridView Combobox

6 Answers 323 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hemal
Top achievements
Rank 1
Hemal asked on 21 Aug 2009, 06:32 AM

Hi,

I am trying to select values from a bounded combobox inside a GridView.
But after a select it and try to select other the previous selected value is not visible.

below is code in xaml :-
 

<telerik:RadGridView Margin="5,0,0,0" Grid.Row="4" Grid.ColumnSpan="2" Name="gvGISMapFields" Width="610" ShowColumnHeaders="True" ShowGroupPanel="False" Height="250">
<telerik:RadGridView.Columns>
<telerik:GridViewComboBoxColumn Name="MatchingField" DisplayMemberPath="MatchingField" UniqueName="MatchingField" HeaderText="Target Field"  IsFilterable="False" IsGroupable="False" IsReorderable="False" IsSortable="False" TextAlignment="Center" Width="250"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>

below is code in xaml.cs :-

GridViewComboBoxColumn matchingField = (GridViewComboBoxColumn)gvMapFields.Columns[1];
matchingField.ItemsSource = matchingGISFields;

6 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 21 Aug 2009, 08:20 AM
Hi Hemal,
Your code seems OK to me at first glance. Can you please open a support ticket and send me your project or a smaller project resembling the issue. This would be of great help for me to find the problem and provide a solution.


Kind regards,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Victor
Top achievements
Rank 1
answered on 19 Nov 2009, 08:10 PM
Hi Pavel,

So you have a solution for this issue ?. I had a similar problem and below is my code:

<

 

 

Telerik:GridViewComboBoxColumn x:Name="cmbFormSections" Header="FormSection" SelectedValueMemberPath="Id"

 

 

 

DisplayMemberPath="Wording" DataMemberBinding="{Binding FormSection.Id}" />

 


I am population my GridView using this code in my .cs file:

GridViewComboBoxColumn

 

 

cmbFormSections = this.View.radGFormSubSections.FindName("cmbFormSections") as GridViewComboBoxColumn;

 

cmbFormSections.ItemsSource = FormSectionsCollection;


When i click in another ceel after selecting a value in cmbFormSections, my selected values disappears.

This is show stopper for me. Please let me know where i am going wrong.

Thanks,
0
Victor
Top achievements
Rank 1
answered on 19 Nov 2009, 08:12 PM
Hi Hemal,

Did you get a solution for this issue. I had the same problem n i am setting all the values correctly.

Please let me know, if you get any reply from the Telerik team.

Thanks.
0
Pavel Pavlov
Telerik team
answered on 20 Nov 2009, 02:21 PM
Hi Victor,

Usually this happens when there is a type mismatch between the type of the ID property - for example in the source of RadGridView it is a string and in the source of the combo it is an integer.

At first glance your code seems ok .
Can you please send us your project( or just  a small project resembling the issue ) . I will gladly have a look to see what may cause the problem and provide the neccesary fix.

Best wishes,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Victor
Top achievements
Rank 1
answered on 20 Nov 2009, 07:32 PM
Hi Pavel,

Thanks for your reply. I have solved the issue last night and forgot to send you an email. I was setting the Selected Value to the ID and it was expecting an object as i was using EntityFramework.

Anyways thanks for the solution.
0
Helio
Top achievements
Rank 2
answered on 15 Apr 2011, 09:59 PM
Hi,

I am also got stuck with the same problem, mentioned in this thread. can u help me what will be the possible solution for this one?

i am sending my xaml and code behind below:

<telerik:GridViewComboBoxColumn Header ="Comparision Operator" UniqueName="Comp" DataMemberBinding="{Binding opcode}" DisplayMemberPath="opname" SelectedValueMemberPath="opcode" Background="{x:Null}"></telerik:GridViewComboBoxColumn>
                                

((GridViewComboBoxColumn)rgvFilterCriteriaDetails.Columns["Comp"]).ItemsSource = GetOperator;

Description:
GetOperator is the list of the items to be displayed in the combo box column.
opname, opcode all are of string types.
Tags
GridView
Asked by
Hemal
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Victor
Top achievements
Rank 1
Helio
Top achievements
Rank 2
Share this question
or