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

Search as you type on formatted values

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Benoit
Top achievements
Rank 1
Benoit asked on 10 Apr 2014, 09:27 AM
Hello,

I'm currently doing a POC of the use of the RadGridView in our product and we are quite stopped right now.

Indeed, we are using the RadGridView with a binded DataTable containing raw values, columns are unknown untill data is recieved so we use a grid column binding attached property to setup our columns.
We are formatting the cell values using a datatemplate that uses a converter doing custom formatting for us (we cannot use DataFormatString property since there is some complicated Data to format).

Now, we want to introduce a "Search as you type" feature, based on the Demo sample.
This is very well working but as we understand this, it filters the rows based on the binded DataTable raw values.
But as we are doing UI, the user is not seeing those values, but the formatted ones, so he will expect to filter on formatted values somehow.

We don't know if our current design is allowing that but if you have any solution regarding this problem, we'll be glad to hear that.

Regards,,

Benoît

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 11 Apr 2014, 03:20 PM
Hi Benoît,

Filtering is a data operation. As such, it is always performed over the actual original, "raw", data through building and executing a LINQ query over the source collection. IValueConverters and DataStringFormats are for UI purposes only and they play absolutely no part in the data operations. 

You could expose a new property to represent the formatted value and set it as FilterMemberPath of the column.
To learn more about what filtering is and how it is performed, please check our documentation:
Basic Filtering.

I hope this helps.

Regards,
Didie
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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