Hi all,
I am applying filter for Radgrid.
For example, I have an Email column, and the length of its data is so long.
But the length of filter textbox is still unchanged. It's not good.
Please see the pic for more detailed.
Please help me to fix it.
Thanks.
Andy.
                                I am applying filter for Radgrid.
For example, I have an Email column, and the length of its data is so long.
But the length of filter textbox is still unchanged. It's not good.
Please see the pic for more detailed.
Please help me to fix it.
Thanks.
Andy.
6 Answers, 1 is accepted
0
                                
                                                    Princy
                                                    
                                            
    Top achievements
    
            
                 Rank 2
                Rank 2
            
    
                                                
                                                answered on 05 Aug 2011, 03:59 AM
                                            
                                        Hello Andy,
Try setting the FilterControlWidth as shown below.
aspx:
Thanks,
Princy.
                                        Try setting the FilterControlWidth as shown below.
aspx:
<telerik:GridBoundColumn FilterControlWidth="170px" UniqueName="Email List" HeaderText="Email List"  DataField="Email List"></telerik:GridBoundColumn>Thanks,
Princy.
0
                                
                                                    Andy
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 05 Aug 2011, 04:38 AM
                                            
                                        Hi Princy,
Thanks for your code.
But it is just a hard code.
I would like to make the filter textbox length changes depends on the data length.
Thanks.
Andy.
                                        Thanks for your code.
But it is just a hard code.
I would like to make the filter textbox length changes depends on the data length.
Thanks.
Andy.
0
                                
                                                    Princy
                                                    
                                            
    Top achievements
    
            
                 Rank 2
                Rank 2
            
    
                                                
                                                answered on 05 Aug 2011, 02:32 PM
                                            
                                        Hello Andy,
Try the same approach in the following documentation.
Setting Filter Textbox Dimensions/Changing Default Filter Image.
Thanks,
Princy.
                                        Try the same approach in the following documentation.
Setting Filter Textbox Dimensions/Changing Default Filter Image.
Thanks,
Princy.
0
                                
                                                    Matt DiPietro
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 05 Aug 2011, 07:56 PM
                                            
                                        I was able to get this to work for auto generated columns by setting the FilterControlWidth in the ItemCreated event
 
                                        Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated    If TypeOf e.Column Is Telerik.Web.UI.GridBoundColumn Then        Dim boundcol As New Telerik.Web.UI.GridBoundColumn        boundcol = CType(e.Column, Telerik.Web.UI.GridBoundColumn)        e.Column.FilterControlWidth = Unit.Percentage(85)    End IfEnd Sub0
                                
                                                    Rakesh Gupta
                                                    
                                            
    Top achievements
    
            
                 Rank 2
                Rank 2
            
    
                                                
                                                answered on 08 Aug 2011, 10:02 AM
                                            
                                        Hello,
You can achieve this by using bellow code.
Let me know for any concerns.
--
Thanks & Regards,
Rakesh T. Gupta
                                        You can achieve this by using bellow code.
<telerik:GridTemplateColumn HeaderText="Email" DataField="Email" SortExpression="Email" UniqueName="Email"   AllowFiltering="true" FilterControlWidth="80%">     <ItemTemplate>          <asp:Label runat="server" ID="lblEmail" Text='<%# Eval("Email") %>'></asp:Label>     </ItemTemplate>         <ItemStyle Wrap="False" /></telerik:GridTemplateColumn>Let me know for any concerns.
--
Thanks & Regards,
Rakesh T. Gupta
0