Simply put in the topic title.
I have an UltraComboEditor bound to a grid cell, and require a masked input.
I tried using the UltraGridCell's MaskInput property to no avail. ("999-9999-999")
Thanks in advance.
Hi,
UltraComboEditor does not have any input masking functionality. You can limit the users choices to the list by setting the DropDownStyle to DropDownList, or using the LimitToList property. Or you could validate when the user has entered in the Validating event of the control.
The purpose of the input mask is to aid with the drop down's AutoSuggest capabilities.
It is rather cumbersome for a user to type in: 243-6577-1... to find all entries starting with this string. I was hoping to mask the input to automatically include the dash (-) and make things a little easier.
Thanks.
I'm a little confused. Maybe I am misunderstanding your post. But if the user has to type a dash (or 2), then why are there items on the list without dashes in them?
If you are binding the UltraComboEditor, then you could filter the items out of the data source.
If you are populating the list manually, then you could simply not add invalid items to the list.
The list contains valid entries for example:
123-4567-890
123-4567-891
123-4567-892
However, the user will be typing into the combo editor but apparently it is too much work for them to type the dash ( - ) as they only want to type the numbers. So I figured the best method would be to apply a mask where the dashes are added automatically as they type.
Hope that clears things up.
Hello,
I am just checking about the progress of this issue. Did you solve your issue accordingly to the information that We provided you? Did you test the sample I have sent to you?
Let me know if you need any further assistance.
I have tested the sample and reviewed the source code to go with it.
The method is plausible but I have yet to implement it into my code.
I'll verify an answer when I get there!
Please let me know if you need any further assistance with this matter.
I believe I am having a problem with these timing issues.
There is another column in my grid which is a "Filter" field used to manipulate the drop down. However, the "Filter" field cannot access the ColumnFilters because they don't exist until after the drop down has been painted?Sorry I'm not entirely sure what happens after the InitialzeLayout event is fired.Once the drop down has been painted the ColumnFilters are populated and work as expected.
EDIT:
Looks like I can just use the Paint event as a pseudo-AfterDropDown event that the DropDownEditorButton doesn't have. This solves my filters problems!
Thanks for all your help Mike.
Okay, I think I see the confusion. There are two different ways to specify ColumnFilters based on the RowFilterMode property.In fact, the ColumnFilters property exists on two different objects.
The code you have here is attempting to clear the ColumnFilters on the Rows collection of the grid. This will not work for the root band and it won't have any effect on any band unless your RowFilterMode is set to SiblingRowsOnly (which is not the default).
If your RowFilterMode is the default or you want to clear the filters on the root band, you should be using the ColumnFilters on the band, not the Rows collection:
this.m_AccountDropDown.,DisplayLayout.Bands[0].ColumnFilters["Client_Id"].ClearFilterConditions();
I'm still not sure what dropping down a DropDownEditorButton has to do with this. I don't see how they could possibly have any effect. Unless maybe you are setting up some ColumnFilters in code and there is some sort of timing issue because the grid hasn't painted, yet. But that doesn't seem likely.
This code:
this.m_AccountDropDown.Rows.ColumnFilters["Client_Id"].ClearFilterConditions();
Cannot be executed as the ColumnFilters array has a length of zero. Once I have clicked the DropDownEditorButton and the drop down has been displayed (The _InitializeLayout method has already been called at this point.) the ColumnFilters is populated and I am able to continue without error.
So the question is, which methods need to executed in order to populate the ColumnFilters array?
I don't understand your question. What exactly do you mean by "initialized".
I am using ColumnFilters to work alongside the EditorWithMask control and it works well.
I am having a small issue with the ColumnFilters not being initialized until after I do a DropDown() of my grid. How can I avoid doing this or - what methods are called during the drop down that construct the ColumnFilters?