Hi,
I am using NetAdvantage Winforms 9.2. Managed to create a reproducible code snippet as below
Can you please advise?
Form f = new Form();Infragistics.Win.UltraWinGrid.UltraCombo uc = new Infragistics.Win.UltraWinGrid.UltraCombo();uc.NullText = "Empty";uc.Value = null;uc.AlwaysInEditMode = true;uc.Location = new Point(1,1);Infragistics.Win.Misc.UltraButton b = new Infragistics.Win.Misc.UltraButton();b.Location = new Point(1, 30);f.Controls.Add(uc);f.Controls.Add(b);f.ShowDialog();
I think NullText only applies when DropDownStyle is DropDownList. Otherwise, the control has to use the list to convert DataValue to DisplayText, so what you can do is put a null item on the list with the text you want.
Thanks Mike, I got this working but in order to replicate the NullText behaviour and still accept keyboard input in the control I had to implement with Leave, Enter and ValueChanged events which is quite cumbersome for a simple thing. Thanks for the reply although not sure I understand why the property works only in DropDownList style
Hello javiguti,
I have found out the reason for this behavior. It is casued by two things:
1. You would have to explicitly set the AllowNull to True on the UltraCombo control.
2.You shouldn't set the AlwaysInEditMode to True, because this prevents the NullText to be displayed.
I have made this two modification in the code below:
Form f = new Form(); UltraCombo uc = new UltraCombo(); uc.AllowNull = Infragistics.Win.DefaultableBoolean.True; uc.NullText = "Null Text"; uc.Value = null; uc.Location = new Point(1, 1); UltraButton b = new UltraButton(); b.Location = new Point(1, 30); f.Controls.Add(b); f.Controls.Add(uc); f.ShowDialog();
Please feel free to let me know if you have any other questions with this matter.
I have created a case for you where I will investigate this sceanrio further for you.
The case number is: CAS-73442-0MH3VP
I will update you through the case.
If you have any other questions please feel free to let us know.