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

[Solved] set filter width

6 Answers 497 Views
Grid
This is a migrated thread and some comments may be shown as answers.
newbie
Top achievements
Rank 1
newbie asked on 25 Apr 2008, 05:15 PM
I want my filter column width to match the column size.
How can i change the width of my filet columns?

6 Answers, 1 is accepted

Sort by
0
Vladimir
Top achievements
Rank 1
answered on 26 Apr 2008, 07:12 AM
You can set width for every grid column using HeaderStyle.Width. Here is also an example related to filter textboxes:
http://www.telerik.com/help/radcontrols/prometheus/grdSettingFilterTextBoxDimensions.html
0
Shinu
Top achievements
Rank 2
answered on 28 Apr 2008, 01:05 PM
Hi,

Here is another link that you will find helpfull.

http://www.telerik.com/help/aspnet/grid/?grdCustomizingFilteringMenu.html


Thanks,
Shinu

0
newbie
Top achievements
Rank 1
answered on 28 Apr 2008, 03:40 PM
Thanks.

The problem is all my columns in the grid have a filter box.
All the columns are of different length.If i set the width of filter box in css all the filter boxes will use that width.

I want that the filter box should be of the same length as the column.
Any ideas?
0
Konstantin Petkov
Telerik team
answered on 29 Apr 2008, 07:08 AM
Hello,

The Grid automatically adjusts the filtering text box according to the column width. Here is an example with auto layout Grid table and enabled filtering:

http://www.telerik.com/demos/aspnet/prometheus/Grid/Examples/GeneralFeatures/Filtering/DefaultCS.aspx

The help article links posted below explain the options of modifying the filtering menu according to any specific requirements.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 29 Apr 2008, 04:22 PM

Thanks for the post.

The grid adjusts the filer width for the columns automatically.
But I have two columns where I am specifying the width and the filer box for those cloumns is not getting adjusted.

Please suggest.

Below is how I have specified the columns in my grid:

<

telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Roadway" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Roadway" SortExpression="Roadway" UniqueName="Roadway"ItemStyle-Wrap="false" >

</telerik:GridBoundColumn> 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="LastInspectionDate" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Last Inspection Date" SortExpression="LastInspectionDate" UniqueName="LastInspectionDate" ItemStyle-Wrap="false" DataFormatString="{0:MM/dd/yy}" ItemStyle-Width="100px" HeaderStyle-Width="100px">

</telerik:GridBoundColumn>

0
Konstantin Petkov
Telerik team
answered on 30 Apr 2008, 06:53 AM
Hello newbie,

Here is the other approach you can follow:

http://www.telerik.com/community/forums/thread/b311D-bdkcea.aspx

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
newbie
Top achievements
Rank 1
Answers by
Vladimir
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
newbie
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or