Filter textbox alignment

3 posts, 0 answers
  1. Richard
    Richard avatar
    6 posts
    Member since:
    May 2003

    Posted 11 Mar 2008 Link to this post

    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. Ves
    Ves avatar
    2926 posts

    Posted 14 Mar 2008 Link to this post

    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,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Israel
    Israel avatar
    3 posts
    Member since:
    Feb 2013

    Posted 22 Sep 2015 in reply to Ves Link to this post




Back to Top