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

How to disable the filter function in Template Column

3 Answers 271 Views
Grid
This is a migrated thread and some comments may be shown as answers.
314
Top achievements
Rank 1
314 asked on 28 May 2008, 01:26 PM
How can I do it?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 May 2008, 07:09 AM
Hi,

Try setting the AllowFiltering property for the GridTemplateColumn to false.

APSX:
 <telerik:GridTemplateColumn UniqueName="Tempcol"  AllowFiltering="false">  
                     </telerik:GridTemplateColumn> 

Thanks
Princy.
0
puru
Top achievements
Rank 1
answered on 06 Oct 2008, 02:22 PM
Hi,
This is not working in my case.
Please suggest another method.
Thanks,
Puru
0
Shinu
Top achievements
Rank 2
answered on 07 Oct 2008, 03:23 AM
Hi Puru,

Try disabling the filtering for GridTemplateColumn in the PreRender event and see if it is working.

CS:
  protected void RadGrid2_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridColumn col in RadGrid2.MasterTableView.RenderColumns) 
        { 
            if (col.ColumnType == "GridTemplateColumn") 
            { 
                GridTemplateColumn tempcol = (GridTemplateColumn)col; 
                tempcol.AllowFiltering = false
            } 
        } 
        RadGrid2.Rebind(); 
    } 


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