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

Setting the FilterControlWidth Property

2 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Seth
Top achievements
Rank 1
Seth asked on 13 Sep 2010, 02:10 PM
It appears that setting the FilterControlWidth property affects both the textbox that appears in the header of the grid as well as the textbox that appears in the HeaderContextMenu Filter area.  I am assuming that it is currently not possible to set the width of one without affecting the width of the other. Am I correct in this assumption?

Seth

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Sep 2010, 02:22 PM
Hello Seth,


Have you tried accessing the control from code behind and setting the width?

Code:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem filterItem = (GridFilteringItem)e.Item;
        TextBox txtBox = (TextBox)filterItem["ColumnUniqueName"].Controls[0];
        txtBox.Width = Unit.Pixel(200);
    }
}


Thanks,
Princy.
0
Seth
Top achievements
Rank 1
answered on 13 Sep 2010, 03:18 PM
Solid.  That worked perfectly.

Thanks!
Tags
Grid
Asked by
Seth
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Seth
Top achievements
Rank 1
Share this question
or