How to specify the WebDropDown Current Text (Entered By User) Max Length = 3
Hello,To achieve the limitations you requested you have to add WebTextEditor to your page and set its property MaxLength to 3 as in the following code:<ig:WebTextEditor ID="WebTextEditor1" runat="server" MaxLength="3">
</ig:WebTextEditor>
and then set the EditorID="WebTextEditor1" of the WebDropDown you want to limit. However it occurs that there is an issue with this under IE and I have logged this behavior in our internal tracking system with a Development ID of 84465. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by going to the “My IG” tab on our website, hovering to the "My Support Activity" dropdown and selecting the "Development Issues" tab.
you a so as a temporary solution I will suggest you to handle one of the following events of the WebDropDown:function WebDropDown1_ValueChanging(sender, eventArgs)
{
if (sender._elements.Input.value.toString().length > 3)
eventArgs.set_cancel(true)
}
function WebDropDown1_InputKeyDown(sender, eventArgs)
Please let me know if you need further assistance.
Hi Nikifor,
Thanks for the quick Reply, above mentioned solution with using EditorID="WeTextEditor" worked perfectly. I have tested it along with all the major new released Browser(s), its working fine except IE, that you had already mentioned.Following Code :
function igdropdown_ValueChanging(sender, eventArgs) { alert("inside function"); if (sender._elements.Input.value.toString().length > 3) eventArgs.set_cancel(true) } function igdropdown_InputKeyDown(sender, eventArgs) { alert("inside function"); if (sender._elements.Input.value.toString().length > 3) eventArgs.set_cancel(true)
Doesn't hits the alert. I'm missing something.
Is there any way to pass parameters in below mentioned example:
ClientEvents-InputKeyDown="isNumeric(XXX);"
where xxx is the parameter to be passed:
function isNumeric(keycode){
//SOME CODE