Gridview Column Filter Showing IDs

5 posts, 0 answers
  1. Matt Leeds
    Matt Leeds avatar
    12 posts
    Member since:
    Apr 2010

    Posted 18 Jan 2012 Link to this post

    I have programmatically added a column to a grid.  In the header filter, it is showing IDs next to the check boxes rather than friendly names.  It is a 'GridViewComboBoxColumn'.  Here is the code that is being used to create the column:

    GridViewComboBoxColumn myColumn = new GridViewComboBoxColumn();
    myColumn.Header = "Person";
    myColumn.UniqueName = "Person";
    myColumn.DisplayMemberPath = "FullName";
    myColumn.DataMemberBinding = new System.Windows.Data.Binding("PersonId");
    myColumn.SelectedValueMemberPath = "PersonId";

  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 18 Jan 2012 Link to this post

    Hi Mat,

    Do you use the  ItemsSource property or ItemsSourceBinding property of the combo column ?
    The filtering UI will show the right values only in the case with ItemsSource property being used for the column.

    Regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Matt Leeds
    Matt Leeds avatar
    12 posts
    Member since:
    Apr 2010

    Posted 18 Jan 2012 Link to this post

    Yes, I do.  I did forget to include it in my source code snippet, but I do.  Here is a full snippet:


    GridViewComboBoxColumn myColumn = new GridViewComboBoxColumn();
    myColumn.Header = "Person";
    myColumn.UniqueName = "Person";
    myColumn.DisplayMemberPath = "FullName";
    myColumn.DataMemberBinding = new System.Windows.Data.Binding("PersonId");
    myColumn.SelectedValueMemberPath = "PersonId";
     
     
    myColumn.ItemsSource = AdminDataManagerContext.Persons;
    TableColumnsGrid.ItemsSource=AdminDataManagerContext.Supplies;
    TableColumnsGrid.Columns.Insert(5, myColumn);

  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 19 Jan 2012 Link to this post

    Hello  Mat,

    The feature to show friendly names instead of IDs for the combo column was recently  added. May you confirm you are using latest version of the Telerik dlls ?

    Regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 19 Jan 2012 Link to this post

    Hello  Mat,

    The feature to show friendly names instead of IDs in the filtering UI  for the combo column was recently  added. May you confirm you are using latest version of the Telerik dlls ?

    Regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner