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

resize filteringItem

3 Answers 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rafael
Top achievements
Rank 1
Rafael asked on 03 Feb 2012, 12:45 PM
We would like to know if it is possible to decrease the linecontaining the filter housings in RadGrid, if so how? Help 

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Feb 2012, 01:03 PM
Hello Rafael,

I suppose you want to change the width of filter textbox. Here is the sample code.
C#:
protected void grid_PreRender(object sender, EventArgs e)
{
    GridFilteringItem item = (GridFilteringItem)grid.MasterTableView.GetItems(GridItemType.FilteringItem)[0];
    TextBox txtbx = (TextBox)item["UniqueName"].Controls[0];
    txtbx.Width = Unit.Pixel(20);
}
Also you cant set the width using FilterControlWidth property.
aspx:
<telerik:GridBoundColumn FilterControlWidth="150px" DataField="LastName" UniqueName="LastName"></telerik:GridBoundColumn>

-Shinu.
0
Rafael
Top achievements
Rank 1
answered on 03 Feb 2012, 01:23 PM
Actually I wanted to scale the height of the row where are the items. like this:
filteringItem.Height = 2, but it has a limit and does not causealterations to decrease beyond the standard, can only increase the size ... Suggestions? 
0
Accepted
Shinu
Top achievements
Rank 2
answered on 06 Feb 2012, 06:19 AM
Hello Rafael,

In order to change the height, try the following CSS.
CSS:
<style type="text/css">
  .RadGrid_Default .rgFilterBox
  {
    height:50px !important;
  }
</style>

-Shinu.
Tags
Grid
Asked by
Rafael
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rafael
Top achievements
Rank 1
Share this question
or