gridviewcombobox ROW height

6 posts, 2 answers
  1. panchooo
    panchooo avatar
    13 posts
    Member since:
    Jun 2009

    Posted 22 Nov 2010 Link to this post

    hi guys im on a project that consists in a kiosk with a touchscreen

    i have a gridview on  it that has a column that uses a gridviewcombobox,

    I populate the combobox the problem is that each row is to small and it will be dificult for the users to press and select the combo box option in the touch screen, is there anyway to make this rows bigger?

    Thanks......
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 22 Nov 2010 Link to this post

    Hello,

    Can you give this a try
    Private Sub RadGridView1_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized
        If TypeOf Me.RadGridView1.CurrentRow Is GridViewDataRowInfo Then
            Dim editor As RadDropDownListEditor = TryCast(Me.RadGridView1.ActiveEditor, RadDropDownListEditor)
            If Not editor Is Nothing Then
                For Each item As RadListDataItem In CType((CType(Me.RadGridView1.ActiveEditor, RadDropDownListEditor)).EditorElement, RadDropDownListEditorElement).Items
                    item.Height = 50
                Next
            End If
        End If
    End Sub

    hope this helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. panchooo
    panchooo avatar
    13 posts
    Member since:
    Jun 2009

    Posted 22 Nov 2010 Link to this post

    richard thanks, that did work
    had to set true to the autosizeitems for the RadDropDownListEditorElement

    one more thing since the row height incremented only to element show up how can i expand
    the area where the elements are shown?
    or incremente the size of the vertical scrollbar

    thanks
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 22 Nov 2010 Link to this post

    Hello,

    I don't have a suitable dev environment available at the moment, but I think you should be able to set the min / max / size of the element in the same way as above. E.g.

    CType((CType(Me.RadGridView1.ActiveEditor, RadDropDownListEditor)).EditorElement, RadDropDownListEditorElement).MinSize = New Size(200,200)
    CType((CType(Me.RadGridView1.ActiveEditor, RadDropDownListEditor)).EditorElement, RadDropDownListEditorElement).MaxSize = New Size(200,200)
    CType((CType(Me.RadGridView1.ActiveEditor, RadDropDownListEditor)).EditorElement, RadDropDownListEditorElement).Size = New Size(200,200)

    though I cannot be sure until I try it. If this works for you, please remeber to mark all suggestions that have helped as answer. If you need more information, just let me know

    Richard
  6. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 23 Nov 2010 Link to this post

    Hello,

    This forum link should answer your last question.
    Hope that helps
    Richard
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 24 Nov 2010 Link to this post

    Hello,

    Did this all work for you? If so, please could you mark any answers that helped as answer so others can find the solution too.
    Many thanks
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready