We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using Filters with Comboboxes

Thread ID:

Created:

Updated:

Platform:

Replies:

115320 Jan 9,2014 03:25 PM May 16,2014 07:32 AM WPF 1
loading
Tags: GridControl
Andrew Wilcox
Asked On January 9, 2014 03:25 PM

I have a GridDataVisibleColumn with the MappingName="IssuerId".
 
<sf:GridDataVisibleColumn HeaderText="Issuer" MappingName="IssuerId" IsReadOnly="False" Width="125" >
     <sf:GridDataVisibleColumn.HeaderStyle>
         <sf:GridDataColumnStyle HorizontalAlignment="Center"/>
     </sf:GridDataVisibleColumn.HeaderStyle>
     <sf:GridDataVisibleColumn.ColumnStyle>
         <sf:GridDataColumnStyle CellType="ComboBox" DropDownStyle="AutoComplete"/>
     </sf:GridDataVisibleColumn.ColumnStyle>
 </sf:GridDataVisibleColumn>
 
 
In Code Behind I hook up the ItemsSource to my View Model list; DisplayMember, & ValueMember.
 
 this.grdImportBlotter.VisibleColumns["IssuerId"].ColumnStyle.ItemsSource = this.vm.Issuers;
 this.grdImportBlotter.VisibleColumns["IssuerId"].ColumnStyle.DisplayMember = "DealName";
 this.grdImportBlotter.VisibleColumns["IssuerId"].ColumnStyle.ValueMember = "DealId";
 
When I try to filter this column, the list that the user can filter on is a list of, what appears to be the ValueMember, rather than the DisplayMember.
How can I get the filter control to show the Name (DisplayMember) rather than the ValueMember (which is a Guid)?
Thanks.

Jai Ganesh S [Syncfusion]
Replied On May 16, 2014 07:32 AM

Hi Andrew,

 

We are sorry for the delay.

 

We have analyzed your query. You can get the filter control based on DisplayMember by setting the “CanFormatExcelLikeFilterText “API as true in the GridDataVisibleColumn. Please find the code snippet to illustrate this,

 

Code Snippet [XAML]:

 

<syncfusion:GridDataVisibleColumn HeaderText="Issuer" CanFormatExcelLikeFilterText="True" MappingName="IssuerId" IsReadOnly="False" Width="125" >

 

      <syncfusion:GridDataVisibleColumn.HeaderStyle>

           <syncfusion:GridDataColumnStyle HorizontalAlignment="Center"/>

      </syncfusion:GridDataVisibleColumn.HeaderStyle>

 

      <syncfusion:GridDataVisibleColumn.ColumnStyle>

           <syncfusion:GridDataColumnStyle CellType="ComboBox" DropDownStyle="AutoComplete"/>

      </syncfusion:GridDataVisibleColumn.ColumnStyle>

 

</syncfusion:GridDataVisibleColumn>

 

Please let us know if you need further assistance.

 

Thank you,

Jai Ganesh S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;