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

RadGrid NumericColumn Width in case Filtering is enabled

1 Answer 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tarun
Top achievements
Rank 1
Tarun asked on 22 Nov 2011, 03:38 PM

Hi,

I am unable to see the numericcolumn filter image for the following scenario. Is there a way to auto-set the column width to the header width.

Consider the following scenario:
I have a grid with the width specified. Varoius columns are added to that grid. Filtering is allowed, resizing is allowed.

When i run this code, the columns does not display the filter image. It gets hidden. Only when i manually resize the column, i am able to see the filter icon.

<asp:Panel ID="PanelForGrid" Width="900px" Height="400Px" runat="server">
    <Grid ID="PortfolioGrid" runat="server" Width="100%" Height="100%" AutoGenerateColumns="false"
        AllowFilteringByColumn="true" AllowSorting="true" AllowPaging="true" PageSize="3">
  <ClientSettings EnablePostbackOnRowClick="true">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" EnableVirtualScrollPaging="true" ScrollHeight="400px" />
            <Resizing AllowColumnResize="true" AllowRowResize="true" ClipCellContentOnResize="false" EnableRealTimeResize="true" AllowResizeToFit="true" ResizeGridOnColumnResize="false"/>
  </ClientSettings>
        <MasterTableView DataKeyNames="Id" TableLayout="Fixed">
        <columns>
  
   <GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Guid" Visible="true"></GridBoundColumn>

   <GridBoundColumn DataField="FirstName" HeaderText="FirstName" UniqueName="FirstName" Visible="true"></GridBoundColumn>

   <GridBoundColumn DataField="LastName" HeaderText="LastName" UniqueName="LastName" Visible="true"> </GridBoundColumn>

   <GridDateTimeColumn DataField="DOB" HeaderText="DOB" UniqueName="DOB" Visible="true" DataFormatString="{0:dd/MM/yyyy}" EditDataFormatString="dd MMMM, yyyy hh:mm tt"> </GridDateTimeColumn >

   <GridNumericColumn DataField="DeptId" DataType="System.UInt16" HeaderText="DeptId" UniqueName="DeptId" Visible="true"> </GridNumericColumn>

   <GridNumericColumn DataField="Salary" HeaderText="Salary" UniqueName="Salary" Visible="true" > </GridNumericColumn>

   <GridBoundColumn DataField="Designation" HeaderText="Designation" UniqueName="Designation" Visible="true"> </GridBoundColumn>

  </columns>
        </MasterTableView>
    </Grid>
</asp:Panel>

Seems the filtering textbox has a fixed width set in the control.
Please suggest a way to override that behavior.

Thanks
Tarun

1 Answer, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Nov 2011, 05:30 PM
Hello Tarun,

Please try with below code snippet.

<telerik:GridNumericColumn FilterControlWidth="100px"


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Tarun
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or