Apply converter to GridViewDataColumn

5 posts, 1 answers
  1. Xaria D
    Xaria D avatar
    68 posts
    Member since:
    May 2010

    Posted 01 Jul 2010 Link to this post

    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??
  2. Answer
    Milan
    Admin
    Milan avatar
    1989 posts

    Posted 01 Jul 2010 Link to this post

    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
  3. Ben
    Ben avatar
    1 posts
    Member since:
    Oct 2012

    Posted 23 Oct 2012 Link to this post

    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
  4. Pankaj
    Pankaj avatar
    15 posts
    Member since:
    May 2011

    Posted 20 Feb 2013 Link to this post

    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
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Feb 2013 Link to this post

    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.

Back to Top