How can I get along with bilingual headers (RadGridView)?

2 posts, 0 answers
  1. Enric
    Enric avatar
    32 posts
    Member since:
    Apr 2013

    Posted 18 Jan 2014 Link to this post

    Hi there,

    In my WPF project I'm using two RESX files in order to keep both english and spanish languages, freely chosen for the user

    When I assign my SQL view on ItemsSource I get twice the name of the headers (logically, I get each header from V_Clientes2 object and then get each header in Columns collection.. For example: Header="{Resx RadGridViewCustomers_Nombre}")



    I do not know how can I fix that... it is not acceptable at all, 'cause the user see "Name" and "Nombre" at the same time instead to see just one of them:

    XAML:

      <telerik:RadGridView x:Name="dgvClientes" ItemsSource="{Binding V_Clientes2}" HorizontalAlignment="Left"
                Margin="10,44,0,-45" VerticalAlignment="Top" Height="531"
                Width="469" ColumnWidth="SizeToCells" PreviewMouseDoubleClick="dgvClientes_PreviewMouseDoubleClick" Grid.ColumnSpan="2" Grid.RowSpan="3">

                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Tipo}" Header="{Resx RadGridViewCustomers_Tipo}" />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Documento}" Header="{Resx RadGridViewCustomers_Doc}" />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Nombre}" Header="{Resx RadGridViewCustomers_Nombre}" />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Apellido1}" Header="{Resx  RadGridViewCustomers_PrimerApellido}" />

                </telerik:RadGridView.Columns>



    Find attached one image where you can see this problem.

    Thanks in advance for your time and advices,
  2. Vera
    Admin
    Vera avatar
    263 posts

    Posted 21 Jan 2014 Link to this post

    Hello Enric,

    As far as I can see, you have not set RadGridView.AutoGenerateColumns to False and there are columns defined in xaml. I guess that this is the reason for having duplicated columns.

    Regards,
    Vera
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top