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

Gridview Column Filter Showing IDs

4 Answers 34 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matt Leeds
Top achievements
Rank 1
Matt Leeds asked on 18 Jan 2012, 05:42 PM
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";

4 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 18 Jan 2012, 05:48 PM
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 >>

0
Matt Leeds
Top achievements
Rank 1
answered on 18 Jan 2012, 07:02 PM
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);

0
Pavel Pavlov
Telerik team
answered on 19 Jan 2012, 01:48 PM
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 >>

0
Pavel Pavlov
Telerik team
answered on 19 Jan 2012, 01:48 PM
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 >>

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