I've included a DropDownProvider in my WebDataGrid and set the DisplayMode to DropDownList and added the provider to my RowAdding behavior. When the user clicks on the cell, the word "NULL" is displayed as the defualt value. I've set the EditorControl-NullText to "Select..." and the NullText property of the EditorControl to "Select..." but I still get null in the dropdown. I do not want the user to be able to type in whatever they want, otherwise the DropDown displaymode would work. How do I get rid of the word NULL in the provider?
Mark
Hello Mark,
“NullText” property is used to display text in the dropdown when the dropdown do not have focus:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Infragistics4.Web.v11.2~Infragistics.Web.UI.ListControls.WebDropDown~NullText.html
When the dropdown is used as editor provider it is not initially displayed and that is why the null text is not shown. When the provider is shown it is normally with the focus and the null text is not displayed again.
If you want to have text for the displayed item, one possible way is to insert it as index zero element in Data Source or dynamically trough code.
Inform me if you need further assistance with this question.
Actually, it just the opposite. When the control DOES NOT have focus nothing is displayed. When the control DOES have focus the word "null" appears.
What would purtting a zero element do? I already have a zero element.
I have a required field validator on that column. If it force a value either as the zero element or dynamically how will that effect the validator.
I am attaching a sample to this post in order to let you modify it in the way that the described by you behavior is reproducible.
Note that when dropdown in the add row is opened and the focus is lost (to the browser address bar for example) the null text is actually appearing.
Review this example, made the changes needed and update me with the result.
Let me know if you have further questions.