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

hide sort icon

1 Answer 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 26 Nov 2012, 12:38 PM
Hai

I would like to have the sort icon hidden for all the columns. I know how to hide it in aspx, but I have to write it for all the columns. Hope there is a solution in code behind loop through all the column and hide the image.

thanks
Allen

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Nov 2012, 12:40 PM
Hi,

Please try the following code snippet to hide the filter icon.

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
    {
        col.ShowSortIcon = false;
    }
    RadGrid1.Rebind();
}

Thanks,
Shinu.
Tags
Grid
Asked by
Allen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or