Home - Forums-.NET - FlyGrid.Net (Windows Forms) - force dropdownlistcolumn to expand

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

force dropdownlistcolumn to expand
Link Posted: 19-Oct-2005 02:19
Hi,
On a normal combobox control there is the property DroppedDown that can be set to True or False in order to show or not the list of item of the combo.
How can this be done on a DropdownListColumn ?

Thanks
Link Posted: 19-Oct-2005 09:21
Thanks for the suggestion, this property will avaialble in the nearest FlyGrid.Net update.
Link Posted: 21-Oct-2005 01:52
Great. Many thanks
Link Posted: 02-Nov-2005 22:30
I've seen there is the new property DroppedDown. But it does not seem to work. Could you show me a quick example on how to use it ?

Thanks
Link Posted: 03-Nov-2005 02:41
[VB.Net]
Private fcolumn As NineRays.Windows.Forms.Grids.DropDownListColumn

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
    Dim arr As Object()() = New Object()() {New Object() {"First Row", 1, New DateTime(2005, 10, 30)}, New Object() {"Second Row", 2, New DateTime(2005, 10, 30)}, New Object() {"Third Row", 3, New DateTime(2005, 10, 30)}}

    FlyGrid1.Options = CType(((NineRays.Windows.Forms.Grids.GridOptions.RowSelect Or NineRays.Windows.Forms.Grids.GridOptions.ShowFocusRectangle) Or NineRays.Windows.Forms.Grids.GridOptions.Default), NineRays.Windows.Forms.Grids.GridOptions)

    FlyGrid1.Style = NineRays.Windows.Forms.Grids.GridStyle.XP

    'Do not forget to add Columns
    'init first column - dropdown list column
    fcolumn = New NineRays.Windows.Forms.Grids.DropDownListColumn("RowName")
    fcolumn.Items.AddRange(New String() {"First", "Second", "Third"})
    ' add columns
    FlyGrid1.Columns.Items.AddRange(New NineRays.Windows.Forms.Grids.Column() {fcolumn, New NineRays.Windows.Forms.Grids.Column("RowId"), New NineRays.Windows.Forms.Grids.Column("Data")})
    'attach data array to data source
    FlyGrid1.Rows.DataSource = arr
End Sub

'button drop downs list of first (dropdownlist column) column
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    FlyGrid1.Focus()
    FlyGrid1.Columns.CurrentColumn = 0
    fcolumn.DroppedDown = True
End Sub
Link Posted: 03-Nov-2005 04:02
Thanks