Method similar to GridViewBoundColumnBase.GetValueForItem but returns the actual value of the property?

2 posts, 0 answers
  1. Jan Paolo
    Jan Paolo avatar
    26 posts
    Member since:
    Sep 2018

    Posted 16 May Link to this post

    Hello,

    Given <telerik:GridViewDataColumn DataMemberBinding="{Binding Number, StringFormat=C}" />..
    If I use GetValueForItem, I get the formatted value (e.g. $1.00)..
    Is there a method so I can get "1" instead?

    Thank you,

    Jan

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    908 posts

    Posted 21 May Link to this post

    Hello Jan,

    You can get the desired value by using the GetValue method of the BindingExpressionHelper class. The class is defined in the Telerik.Windows.Controls namespace.

    var value = BindingExpressionHelper.GetValue(item, column.DataMemberBinding);

    Please let me know if this works for you.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top