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

gridviewcombobox ROW height

5 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
panchooo
Top achievements
Rank 2
panchooo asked on 22 Nov 2010, 04:02 PM
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......

5 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 22 Nov 2010, 05:22 PM
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
0
panchooo
Top achievements
Rank 2
answered on 23 Nov 2010, 12:19 AM
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
0
Richard Slade
Top achievements
Rank 2
answered on 23 Nov 2010, 12:31 AM
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
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 23 Nov 2010, 10:24 AM
Hello,

This forum link should answer your last question.
Hope that helps
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 24 Nov 2010, 10:33 AM
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
Tags
GridView
Asked by
panchooo
Top achievements
Rank 2
Answers by
Richard Slade
Top achievements
Rank 2
panchooo
Top achievements
Rank 2
Share this question
or