In this post i'm assuming that you have already done the data binding to the RadGrid. Once you have done the data binding part now you are able to perform the grouping operation on the RadGrid as shown above.
private void GroupRadGrrid()
{
try
{
string expr = "DocHeaderType [Module: ] Group By DocHeaderType";
GridGroupByExpression expression1 = GridGroupByExpression.Parse(expr);
this.RadGrid1.MasterTableView.GroupByExpressions.Add(expression1);
}
catch (Exception ex)
{
throw ex;
}
finally
{
RadGrid1.Rebind();
}
}
You'll have to use the below name space.
using Telerik.Web.UI.GridExcelBuilder;
string expr = "DocHeaderType [Module: ] Group By DocHeaderType";
This is the grouping expression
DocHeaderType - The Radgrid group column
[Module: ] - Alias
No comments:
Write comments