Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
DropDown width in Grid
posted

Hi,

I have a grid which as a column that has dropdown as it's style. What I need is the drop down width to be as wide as the column. I tried

myDropDown.DropDownWidth = 0

before assigning it to the ValueList property, but then I get a big brown-gray scare beside my drop down, which of course cause me another problem. I also tried

myDropDown.DropDownWidth = myColumn.Width

but as soon as the user resizes the column, I loose my setting. Is there an event on column resizing? I couldn't find one just by the name.

Any  idea?

Thanks,

Stef

Parents
No Data
Reply
  • 1210
    Offline posted

    You can use the BeforeCellListDropDown event:

    Private Sub UltraGrid1_BeforeCellListDropDown(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelableCellEventArgs) Handles

    UltraGrid1.BeforeCellListDropDown

     Dim myValList As Infragistics.Win.ValueList = CType

    (e.Cell.Column.ValueList, Infragistics.Win.ValueList)

    myValList.DropDownListWidth = e.Cell.Width

    End

    Sub

Children