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

RadGridView group by column shows wrong information for GridViewComboBoxColumn, also type ahead not working

5 Answers 106 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.
Stephen
Top achievements
Rank 1
Stephen asked on 15 Aug 2012, 07:40 PM
I had a RadGridView with a GridViewComboBoxColumn inside it.  The data shows fine and works correctly.  The problem is that grouping by that column shows the property instead of the value in it.  It does group, but the display value is wrong.  I have tried about 10 different ways to get it to display right, but it won't.  Also, the type ahead does not work in edit mode.  I am guessing these are related.

When I group by that column, the groups all say "MyPageName.RadComboBoxDetail".  They are sorting by the different possibilities, but all of the groups say the same thing.

I use this same collection for a RadComboBox that is not in a RadGridView.  Earlier today I couldn't get Type Ahead to work in the RadComboBox, but I eventually got that figured out.  I just needed to add the TextSearch.TextPath in and it got that working.  However, nothing I have tried has resolved my two issues when putting this into a RadGridView.

Here is my custom template:
<telerik:ContainerBindingCollection x:Name="UserItemBindings">
  <telerik:ContainerBinding Binding="{Binding Show, Mode=TwoWay}" PropertyName="IsEnabled" />
  <telerik:ContainerBinding Binding="{Binding VisibleState, Mode=TwoWay}" PropertyName="Visibility" />
</telerik:ContainerBindingCollection>
<DataTemplate x:Key="ComboBoxVisibilityTemplate" telerik:ContainerBinding.ContainerBindings="{StaticResource UserItemBindings}">
  <TextBlock Text="{Binding DropDownEntry}" />
</DataTemplate>

Here is the code for the column in my GridViewComboBoxColumn:
<telerik:GridViewComboBoxColumn Width="200"
  DataMemberBinding="{Binding SiteCode}"
  EditTriggers="CellClick"
  Header="Location"
  IsReadOnlyBinding="{Binding IsRowReadOnly}"
  ItemTemplate="{StaticResource ComboBoxVisibilityTemplate}"
  SelectedValueMemberPath="EntryStringId"
  UniqueName="rcbxLocationGrid" />

As I mentioned, I did have this in there at one time, but it didn't help so I took it out: Text.Search.TextPath="DropDownEntry"

5 Answers, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 16 Aug 2012, 12:07 PM
I am adding two screenshots, one before grouping and the other after grouping by location.  Hopefully this gives you whatever you might need to know.
0
Stephen
Top achievements
Rank 1
answered on 17 Aug 2012, 02:05 PM
I really could use some help on this...  still no idea on how to resolve it...
0
Pavel Pavlov
Telerik team
answered on 20 Aug 2012, 01:50 PM
Hi, Stephen

May you share the implementation of your data objects and the way you populate RadGridView. I need to see what is used as ItemsSource in order to reproduce the problem here.

Ideally if you post a small runnable project , i can get it fixed for you .


All the best,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Stephen
Top achievements
Rank 1
answered on 21 Aug 2012, 01:34 PM
I put in a ticket so that I could send you a solution that shows the issues with grouping and type ahead.  There are two columns, with different data templates and slightly different data types, both of which show the issue.  My combo box at the top was what I did to resolve type ahead there, but I couldn't figure out how to replicate that approach with fixing the combo box in a grid view.
0
Accepted
Dimitrina
Telerik team
answered on 22 Aug 2012, 12:10 PM
Hello,

 Thank you for the sample project sent in your other ticket. To share the solution to this situation with the community - you have to set the DisplayMemberPath property of the column. That way the value you have set will be displayed when the GridView is grouped.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Dimitrina
Telerik team
Share this question
or