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

Group-By expressions

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 12 Nov 2008, 05:46 PM
Hi!

I have a problem on group by expression.

My expression is:

Dim expression As GridGroupByExpression = New GridGroupByExpression
            Dim gridGroupByField As GridGroupByField = New GridGroupByField

            'Add select fields (before the "Group By" clause)
            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "Modelo"
            gridGroupByField.HeaderText = "Modelo"
            gridGroupByField.HeaderValueSeparator = ": "
            gridGroupByField.FormatString = "<strong>{0}</strong>"
            expression.SelectFields.Add(gridGroupByField)

            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "TotalEnc"
            gridGroupByField.HeaderText = " Quantidade"
            gridGroupByField.HeaderValueSeparator = ": "
            gridGroupByField.FormatString = "<strong>{0}</strong>"
            gridGroupByField.Aggregate = GridAggregateFunction.Sum
            expression.SelectFields.Add(gridGroupByField)

            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "ValorEnc"
            gridGroupByField.HeaderText = " Total"
            gridGroupByField.HeaderValueSeparator = ": "
            gridGroupByField.FormatString = "<strong>{0:C}</strong>"
            gridGroupByField.Aggregate = GridAggregateFunction.Sum
            expression.SelectFields.Add(gridGroupByField)

            'Add a field for group-by (after the "Group By" clause)
            gridGroupByField = New GridGroupByField
            gridGroupByField.FieldName = "Modelo"
            gridGroupByField.FieldAlias = "ola"
            expression.GroupByFields.Add(gridGroupByField)

And in the result it shows:

Modelo: 5373Modelo Quantidade: 0Modelo Total: 0,00 €

How can i change the word Modelo by ; ???

Thanks!

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Nov 2008, 09:19 AM
Hello Paulo,

You can go through the following help link to customize the group header text.
Customizing GridGroupHeaderItem

Thanks
Princy.
Tags
Grid
Asked by
Paulo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or