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

6 posts, 1 answers
  1. Stephen
    Stephen avatar
    43 posts
    Member since:
    Apr 2012

    Posted 15 Aug 2012 Link to this post

    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"
  2. Stephen
    Stephen avatar
    43 posts
    Member since:
    Apr 2012

    Posted 16 Aug 2012 Link to this post

    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.
  3. Stephen
    Stephen avatar
    43 posts
    Member since:
    Apr 2012

    Posted 17 Aug 2012 Link to this post

    I really could use some help on this...  still no idea on how to resolve it...
  4. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 20 Aug 2012 Link to this post

    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.

  5. Stephen
    Stephen avatar
    43 posts
    Member since:
    Apr 2012

    Posted 21 Aug 2012 Link to this post

    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.
  6. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Aug 2012 Link to this post

    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.

Back to Top