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
65
UltraWinGrid displaying 0 for blank dropdown value
posted

Hi,

I've got an UltraWinGrid hooked up to a BindingSource.

One of my source's columns/properties is of type Nullable(Of Integer).

I have set the column's ValueList property, and the ValueList includes an entry generated by the line "ValueList.ValueListItems.Add(DBNull.Value, "")"

I have set the following settings on the Column:

                    Column.ValueList = MyValueList
                    Column.NullText = String.Empty
                    Column.Format = String.Empty
                    Column.Nullable = Infragistics.Win.UltraWinGrid.Nullable.Nothing
                    Column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList
                    Column.Header.Caption = "myCaption"

In my dropdown, when the list is dropped down, the blank value shows as an empty option in the list. If I select this option and the cell is still selected, an empty cell is displayed.

When I click off the list, the cell suddenly displays a "0". When I re-focus the cell and the dropdown opens again, the 0 is still displayed in the cell itself, but the entry in the dropdown list is still a blank entry. Clicking on the blank entry again blanks the cell again, until it loses focus, when it displays 0 again.

I've searched the forum and I can't find any solution except for this guy http://es.infragistics.com/community/forums/t/75962.aspx and he doesn't say how he solved his problem.

EDIT: I've just noticed that the "DisplayString" of the ValueList item is being set to "0" instead of an empty string, which I suspect is the root of the problem, but I'm not sure how to deal with it.

Parents Reply Children