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

Filter textbox alignment

2 Answers 181 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 11 Mar 2008, 11:08 PM
Is it possible to individually align a filter textbox?  My grid has a numeric column that is right aligned for the items and all other columns are left aligned.  The filter box is left aligned and looks like it belongs to a different column.
I realise I can change the alignment of all filter boxes using the FilterItemStyle property but I only want to change the alignment of a single box.

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 14 Mar 2008, 06:23 AM
Hello Jeff,

You can access the table cell in the filtering item for this particular column and customize it. You can do this in ItemCreated event handler  Here is an example:

protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridFilteringItem) 
        { 
            GridFilteringItem item = e.Item as GridFilteringItem; 
            item["MyColumnUniqueName"].HorizontalAlign = HorizontalAlign.Right; 
        } 
    } 


All the best,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Israel
Top achievements
Rank 1
answered on 22 Sep 2015, 02:07 PM

Thanks!!!!!

 

 

Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Ves
Telerik team
Israel
Top achievements
Rank 1
Share this question
or