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

Localized Default GroupField

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rajneesh
Top achievements
Rank 2
Rajneesh asked on 17 Aug 2011, 02:45 PM
HI,
In my grid I have fixed one Field as default Grouping field but i want to localize its text from code behind. How to do it?
My code as:
<GroupByExpressions>
    <telerik:GridGroupByExpression   >
        <SelectFields >
            <telerik:GridGroupByField FieldAlias="Engagement Name" FieldName="EngName" FormatString="{0:d}"></telerik:GridGroupByField>
        </SelectFields>
        <GroupByFields  >
            <telerik:GridGroupByField FieldName="EngNameWithID" HeaderText="Engagement Name"></telerik:GridGroupByField>                                
        </GroupByFields>
    </telerik:GridGroupByExpression>
</GroupByExpressions>

I want to change  HeaderText="Engagement Name" as per localization.
# I am able to localize other columns on radGr1_GroupsChanging event but how to do for default Group?

Thanks..... 

1 Answer, 1 is accepted

Sort by
0
Rajneesh
Top achievements
Rank 2
answered on 18 Aug 2011, 08:01 AM
I did it:
On PageLoad if (!PostBack) Then:
Dim expression As GridGroupByExpression = New GridGroupByExpression
            Dim gridGroupByField As GridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "EngName"
            gridGroupByField.FormatString = "{0:d}"
            expression.SelectFields.Clear()
            expression.SelectFields.Add(gridGroupByField)
            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "EngNameWithID"
            gridGroupByField.HeaderText = "Localize value"
            expression.GroupByFields.Clear()
            expression.GroupByFields.Add(gridGroupByField)
            radGrdEngagments.MasterTableView.GroupByExpressions.Add(expression)
Tags
Grid
Asked by
Rajneesh
Top achievements
Rank 2
Answers by
Rajneesh
Top achievements
Rank 2
Share this question
or