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
80
Problem displaying null value in Ultracombo
posted

Hi,

I have a ultracombo whose datasource is datatable.

Datatable has 2 columns  ( id (identity) and name(varchar))

values are

  • 1, Name1
  • 2, Name2
  • 3,<Null>
  • 4, Name4

Ultracombo  Displaymember is Name and Valuemember is id. Dropdowstyle is dropdown.

At runtime initially combo is blank , but if I click on dropdown arrow the row with NULL value is highlighted.

Earlier I was using infragistics netadvantage for windows form version 2.0 and now I am using 7.1. In version 2.0 combo was initially blank and even I click on dropdown arrow , none of the row was highlighted.

 I was just wondering if there is any property which I need to set in order to get Version 2.0 behavior (none of row should be highlighted). One more thing which I notice in Version 7.1 is , if you put cursor in text area of ultracombo (when it is blank) , it looks like there is space for one character between the cursor and controls left border.

Thanks

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

        When you drop down the list, the Combo will search for an item that matches the current text. In this case, since your combo is blank, it finds the null item and highlights it. The previous behavior was a bug. 

        The only way I see to get around this would be to set teh Value of the combo to some other Value on the list, like 1 - to highlight the first item rather than the third.

        Or you might be able to avoid the Null value getting selected by changing it to an empty string instead of null.  

Children
No Data