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

Pls Help: RadGrid GridGroupByexpresiion problem

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark de Torres
Top achievements
Rank 1
Mark de Torres asked on 19 Jan 2010, 04:36 PM
Hi Guys,

I am having a problem in add gridGroupfield programatically. Here is my code:

User currentProfile = SessionObject.GetCurrentUserProfile();
GridTableView tableViewOrders = new GridTableView(AwardsGrid);
GridGroupByExpression expression = new GridGroupByExpression();
GridGroupByField gridGroupByField = new GridGroupByField();

// SelectFields values (appear in header)
gridGroupByField = new GridGroupByField();
gridGroupByField.FieldName = currentProfile.FirstName;
gridGroupByField.HeaderText = "Firstname";

expression.SelectFields.Add(gridGroupByField);
gridGroupByField = new GridGroupByField();
gridGroupByField.FieldName = currentProfile.Surname;
gridGroupByField.HeaderText = "Lastname ";
expression.SelectFields.Add(gridGroupByField);

//GroupByFields values (group data)
gridGroupByField = new GridGroupByField();
gridGroupByField.FieldName = currentProfile.FirstName;
expression.GroupByFields.Add(gridGroupByField);
tableViewOrders.GroupByExpressions.Add(expression);


 

 



Many thanks

 

 

 

1 Answer, 1 is accepted

Sort by
0
Erwin Floresca
Top achievements
Rank 1
answered on 20 Jan 2010, 05:38 AM
what is the problem? is it throwing any error? looks like you are trying to group in the details table. if not the code to add the expression would be grid.MasterTableView.Expressions.add()....
Tags
Grid
Asked by
Mark de Torres
Top achievements
Rank 1
Answers by
Erwin Floresca
Top achievements
Rank 1
Share this question
or