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

Apply converter to GridViewDataColumn

4 Answers 1038 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Xaria D
Top achievements
Rank 1
Xaria D asked on 01 Jul 2010, 05:07 AM
How to apply converter to  a GridViewDataColumn??
I have a column for which i need to truncate the display of string after particular delimiter.
Should we use a Converter, if so how? or else how can we trim the string??

4 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 01 Jul 2010, 06:24 AM
Hello Xaria D,

Seems like using converter is the best approach in this case. Just apply your converter to the DataMemberBinding of the column and you will see the converter result:

<telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName, Converter={StaticResource Myconverter}" IsReadOnly="True">


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ben
Top achievements
Rank 1
answered on 23 Oct 2012, 11:38 PM
Hi

When applying a converter to the GridViewDataColumn.DataMemberBinding, the results are totally as expected. However, the filter box does not take notice of the converter, I'm wondering if this is by design or a bug.

Thanks

Ben
0
Pankaj
Top achievements
Rank 1
answered on 20 Feb 2013, 12:57 PM
Hi,

I'm also facing the same problem, I have applied a converter to DataMemberBinding, but filter doesn't take this converter into account..
Checkboxes that appear in filtering control shows the values that are displayed (after calling converter), but typing the same values in textbox that is shown below doesn't filter on those displayed values.

Is there a way to achieve the filtering based on the converted values from the textbox.

Thanks,
Pankaj
0
Dimitrina
Telerik team
answered on 20 Feb 2013, 02:28 PM
Hello Pankaj,

I would suggest you to check our online documentation for a better understanding on how the filtering works. 

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Xaria D
Top achievements
Rank 1
Answers by
Milan
Telerik team
Ben
Top achievements
Rank 1
Pankaj
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or