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

Localizing the GroupbyHeader Text

6 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel Mettler
Top achievements
Rank 2
Iron
Daniel Mettler asked on 10 Dec 2009, 11:53 AM
How can i localize the GroupbyHeadertext?

i have a grid with this settings:
<GroupByExpressions> 
                <telerik:GridGroupByExpression> 
                    <SelectFields> 
                        <telerik:GridGroupByField FieldName="DueDate" HeaderText="Due Date" /> 
                    </SelectFields> 
                    <GroupByFields> 
                        <telerik:GridGroupByField FieldName="DueDate" HeaderText="Due Date" /> 
                    </GroupByFields> 
                </telerik:GridGroupByExpression> 
            </GroupByExpressions> 
and now i want to localize the Duedate text. (see image)

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Dec 2009, 12:12 PM
Hi Daniel,

You can change the text that shown in the groupheader by setting the FieldAlias property as shown below.

          <telerik:GridGroupByField FieldName="DueDate" HeaderText="Due Date" FieldAlias="MyText" />

Checkout the documentation if you want to Customizing GridGroupHeaderItem

Thanks,
Princy.
0
Daniel Mettler
Top achievements
Rank 2
Iron
answered on 10 Dec 2009, 12:37 PM
Thank you, that was what im im looking for.

but now, the group item in top of the grid is not localized, i think its the <SelectField>.
How does it work for that?

see the image how it looks now

thanks

0
Hus Damen
Top achievements
Rank 1
answered on 11 Dec 2009, 07:26 AM
Hi Daniel,

I think that the text you are talking about is actually set by the headerText property of the column. So why don't you try change this property and see how it works.

I hope this helps.
Hus
0
Princy
Top achievements
Rank 2
answered on 11 Dec 2009, 08:21 AM
Hello Daniel,

Here's a help document on localizing the grid headers. Take a look at it and see if it helps:
Localizing the grid headers

Thanks
Princy.
0
Daniel Mettler
Top achievements
Rank 2
Iron
answered on 14 Dec 2009, 01:49 PM
I don't get it!
Its the SelectField of <GroupByExpressions> <telerik:GridGroupByExpression>
how can i acces that?
i tried it in ItemDataBound event as well as ItemCreated and ColumnCreated.
Please don't post links, post a real solution! thanks :)
0
Hus Damen
Top achievements
Rank 1
answered on 15 Dec 2009, 04:04 PM
Hi Daniel

You can set the header text directly in the markup:

<GroupByExpressions>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldName="DueDate" HeaderText="My localized text" />  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="DueDate" />  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
</GroupByExpressions>  

I hope this helps.
Hus


Tags
Grid
Asked by
Daniel Mettler
Top achievements
Rank 2
Iron
Answers by
Princy
Top achievements
Rank 2
Daniel Mettler
Top achievements
Rank 2
Iron
Hus Damen
Top achievements
Rank 1
Share this question
or