Showing posts with label telerik radgrid. Show all posts
Showing posts with label telerik radgrid. Show all posts

Saturday, 24 July 2021

How to get group columns from code behind radgrid

 Here I am going to explain how to get list of group columns  from code behind in telerik radgrid.

 The below tutorial helps us to get list of group columns from telerik radgrid. For reports we are able to save the group columns in database and also we can apply when next time we opening the report grid

telerik radgrid, radgrid grouping,telerik


  string groupColumns = "";
int i = 0;
foreach (GridGroupByExpression group in radReports.MasterTableView.GroupByExpressions)
{
    foreach (GridGroupByField field in group.GroupByFields)
    {
        if (i != 0)
        {
            groupColumns = groupColumns + "," + field.FieldName;
        }
        else
        {
            groupColumns = field.FieldName;
        }
        i++;
    }
}