Hi,
Is there a way to have LimitToList functionality in an UltraDropDown, like there is in the Combo?
Thanks for any help.
Steve
I believe LimitToList stands independent of UltraDropDown, because UltraDropDown provides the list of values available to the user, but the column's editor handles the LimitToList functionality. Once you assign the UltraDropDown to the column's ValueList property, set the column's Style property to 'DropDownValidate'.
Thank you very much. That's exactly what I was looking for.
There is one more question I have in regards to UltraDropDown. A minor problem but it would be great if we could solve it:
If the ValueMember of the dropdown is an integer, and the DisplayMember a string (obviously, a very common occurrence), when the dropdown appears in the AddRow - let's say, the AddRow is at the top - a zero appears in the text portion of the dropdown initially, when the user clicks on it. I understand what's happening - the zero is essentially the default for the integer that informs the ValueMember - but it would be really nice if nothing would show in the that area (so that my users won't be asking me why there's a zero there, if the list is all text). I've tried changing the default of the column to null, but an error is thrown regarding not being to convert the null to an integer.
Is there any way to accomplish this? If you need an example, or a screenshot, to show the issue, I'd be glad to supply it.
Thanks a lot,
Hi Steve,
My guess is that this is an issue with the data source you are using. The particular field in question probably cannot support a null value. What kind of DataSource are you using for the grid?
If I am right, then one way around this would be to add an item to your dropdown list which translates a 0 into an empty string.
Or, you would have to change your data source to allow null (or DBNull) so that the AddNew row can display a null in it.
I understand. The datasource in this case is an ObjectResult (we're using EntityFramework 4.0) and the field in question is a primary key - so, obviously, no nulls. It looks like the only solution is to convert the ObjectResult into a BindingList<T> (even a List<T> would work, I guess, since this is a dropdown that just provides choices) or something like that, add the "empty" row, and then assign it to the dropdown's datasource. I'll see how that works.
Anyway, thanks for your quick reply.
By the way, we're doing a fairly extensive application that uses Infragistics controls in an EntityFramework 4.0 MVP architecture. The controls are generally, working well, except for certain peculiarities regarding associations and navigation properties when using EntityCollections as the datasource for the grids. I gather that the standard DataGridView suffers from the same problems but it would be pretty cool if Infragistics could resolve these issues even before Microsoft...
Thanks again,