Hello,
I'm using version 2009.1.311.20 and IE 8. The following does not resize the filter textbox width for any of the filter items. If I switch to compatability mode the textboxes are resized, but the layout of the page is messed up. Here is the RadGrid definition and the event code.
Thanks,
Casey
RadGrid:
Event Code:
I'm using version 2009.1.311.20 and IE 8. The following does not resize the filter textbox width for any of the filter items. If I switch to compatability mode the textboxes are resized, but the layout of the page is messed up. Here is the RadGrid definition and the event code.
Thanks,
Casey
RadGrid:
| <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" |
| GridLines="None" Skin="Office2007" |
| DataSourceID="SqlDataSource1" oninit="RadGrid1_Init" |
| onitemcreated="RadGrid1_ItemCreated"> |
| <MasterTableView CellSpacing="-1" DataSourceID="SqlDataSource1"> |
| <CommandItemSettings RefreshText="" /> |
| <Columns> |
| <telerik:GridBoundColumn UniqueName="column5" |
| DataField="REQUESTOR_ID" Visible="false" Display="false"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Requestor" UniqueName="column" |
| DataField="REQUESTOR"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Requested Person" UniqueName="column1" |
| DataField="REQUESTED_PERSON"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Personal Information System" UniqueName="column3" |
| DataField="DESCRIPTION"> |
| </telerik:GridBoundColumn> |
| <telerik:GridDateTimeColumn HeaderText="Date/Time" UniqueName="column4" |
| DataField="DATE_REQUESTED"> |
| </telerik:GridDateTimeColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
Event Code:
| protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridFilteringItem) |
| { |
| GridFilteringItem filteringItem = e.Item as GridFilteringItem; |
| //set dimensions for the filter textbox |
| TextBox box = filteringItem["column"].Controls[0] as TextBox; |
| box.Width = Unit.Pixel(75); |
| TextBox box1 = filteringItem["column1"].Controls[0] as TextBox; |
| box1.Width = Unit.Pixel(100); |
| TextBox box2 = filteringItem["column3"].Controls[0] as TextBox; |
| box2.Width = Unit.Pixel(200); |
| RadDatePicker box3 = filteringItem["column4"].Controls[0] as RadDatePicker; |
| box3.Width = Unit.Pixel(100); |
| } |
| } |
| protected void RadGrid1_Init(object sender, EventArgs e) |
| { |
| GridFilterMenu menu = RadGrid1.FilterMenu; |
| int i = 0; |
| while (i < menu.Items.Count) |
| { |
| if (menu.Items[i].Text == "NoFilter" || |
| menu.Items[i].Text == "Contains" || |
| menu.Items[i].Text == "EqualTo" || |
| menu.Items[i].Text == "GreaterThan" || |
| menu.Items[i].Text == "LessThan") |
| { |
| i++; |
| } |
| else |
| { |
| menu.Items.RemoveAt(i); |
| } |
| } |
| } |