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

Filter Icon not visible on narrow columns

3 Answers 223 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Niki
Top achievements
Rank 1
Niki asked on 16 Apr 2013, 05:22 PM
Hi
I'm having a problem with narrow columns, in that the filter icon is not visible: instead you have to faff around to try to select the teeny tiiny line that is visible.
Can anyone advise how to force the grid to display/give enough room for the filter icons?
It's my first Telerik grid, so there is nothing fancy going on behind the scenes!
Thanks!

3 Answers, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 16 Apr 2013, 06:58 PM
check this out
setting filter width
0
GreenLizzard
Top achievements
Rank 1
answered on 16 Apr 2013, 07:01 PM
Hi Niki,

I suggest you either to expand the columns with the property HeaderStyle-Width (do not forget to set TableLayout to fixed) or to shrink the filter with the FilterControlWidth.

Hope this helps,
Greeny L
0
Niki
Top achievements
Rank 1
answered on 17 Apr 2013, 05:44 PM
I was finally able to get the Filter Icon visible by setting the width of the filter text box to 90%

Thanks for the other links though - they helped set me on the right path :)

Niki
Protected Sub RadGrid_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated
      If TypeOf (e.Item) Is GridFilteringItem Then
          Dim gfi As GridFilteringItem = e.Item
          Dim tc As TableCell
          Dim numControls As Integer
          Dim o As Object
          For i As Integer = 0 To gfi.Cells.Count - 1
              tc = gfi.Cells(i)
              numControls = tc.Controls.Count
              If numControls > 0 Then
                  For j As Integer = 0 To tc.Controls.Count - 1
                      o = tc.Controls(j)
                      If TypeOf (o) Is TextBox Then
                          CType(o, TextBox).Width = 90
                      ElseIf TypeOf (o) Is RadNumericTextBox Then
                          CType(o, RadNumericTextBox).NumberFormat.GroupSeparator = ""
                      End If
 
                  Next
 
              End If
          Next
      End If
  End Sub
Tags
Grid
Asked by
Niki
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
GreenLizzard
Top achievements
Rank 1
Niki
Top achievements
Rank 1
Share this question
or