Localizing the GroupbyHeader Text

7 posts, 0 answers
  1. Daniel Mettler
    Daniel Mettler avatar
    20 posts
    Member since:
    Apr 2003

    Posted 10 Dec 2009 Link to this post

    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)
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Dec 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel Mettler
    Daniel Mettler avatar
    20 posts
    Member since:
    Apr 2003

    Posted 10 Dec 2009 Link to this post

    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

  5. Hus Damen
    Hus Damen avatar
    33 posts
    Member since:
    Dec 2009

    Posted 11 Dec 2009 Link to this post

    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
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Dec 2009 Link to this post

    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.
  7. Daniel Mettler
    Daniel Mettler avatar
    20 posts
    Member since:
    Apr 2003

    Posted 14 Dec 2009 Link to this post

    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 :)
  8. Hus Damen
    Hus Damen avatar
    33 posts
    Member since:
    Dec 2009

    Posted 15 Dec 2009 Link to this post

    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


Back to Top
UI for ASP.NET Ajax is Ready for VS 2017