Rad Grid Localization Issue

2 posts, 0 answers
  1. Arun
    Arun avatar
    1 posts
    Member since:
    Mar 2013

    Posted 14 Jun 2013 Link to this post

             I am facing issue while working with Localization, my scenario is as follows:
    => I am having Rad DataGrid and we are binding the columns dynamically, while binding I am handling the localization in code behind from the resx file.
    The scenario in which  I am facing issue is for certain columns I need to change color  of some rows depending on certain condition. To achieve this  I hardcode the column name and it was working fine by using a converter. But as I can't hardcode the column name I need to use localization and get the results which I am not able to achieve. here is the sample code how we I approached it when I hardcoded

                                           <Style TargetType="telerik:GridViewRow">
                                               <Setter Property="Background" Value="{Binding Status,Converter={StaticResource rowcolorConveter}}"></Setter>
                                               <Setter Property="Background" >
                                                       <MultiBinding Converter="{StaticResource ABCConveter}">
                                                           <Binding Path="abc"/>//Hardcode Column Name
                                                           <Binding Path="DataContext.SelectedView" RelativeSource="{RelativeSource AncestorType={x:Type UserControl}}"/>

    If u observe I hardcode the "abc" value while binding.I want to pull this hardcode colum name from from resx file and get the value of the column.

  2. Maya
    Maya avatar
    4062 posts

    Posted 17 Jun 2013 Link to this post

    Hi Arun,

    One way to go would be to work with RowStyleSelector instead and handle the logic inside SelectStyle method. Depending on the way you localize your application, you can try to work with the Key for the column header that is declared in the Resource file.


    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top