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
2265
UltraCombo in UltraGrid not allowing nulls
posted

I have an ultra grid which I am binding to a list of objects.  As part of the grid, I have an unbound column to which I have a lookup to a list of values.  I want this list to allow a null value or at least the unbound column I am trying to set.

 

To do this I am using an UltraCombo which is set in my form.  I set this to the unbound column using the following code in Grid InitializeLayout:

	e.Layout.Bands(0).Columns("User").ValueList = Me.UserCombo1
        e.Layout.Bands(0).Columns("User").Style = ColumnStyle.DropDown
        e.Layout.Bands(0).Columns("User").Nullable = Infragistics.Win.UltraWinGrid.Nullable.Nothing
e.Layout.Bands(0).Columns("User").DataType = GetType(User)

Notable properties set on the UltraCombo are:

AllowNull = true
DropDownStyle - tried DropDown and DropDownList
LimitToList = false

I set the unbound column in Grid InitializeRow event.

When the I drop the combo down, there is nothing I can see to set a null value. 

I have tried adding a Nothing (null) value to my data source which is basically List(Of User).  This shows up in the list.  However, when I select it and change row, it appears to select the original value in the drop down.  All seems to get set correctly in AfterCellUpdate, but it fires twice - first with the null selection then the initial value.

 

Any thoughts?  I've been looking at this for over a day and a half and cannot fathom it out.

Thanks

Andez