Hi,
We're using the infragistics Webdropdown v11.2 in our web projects, but I've a weird issue: if one of the validationcontols on my page has an InValid state, the webdropdown won`t postback!
I`ve tested it with v11.1, and in that version, this problem doesn't exist. It`s only in v11.2 of the webdropdown.
I'll include a test project with this problem reproduced (but its very simple, when you add a webdropdown with AutoPostBackFlags-SelectionChanged="On" and a validator who says that the page is not valid, you have the same conditions, but for the lazy people: see the my attached project :) )
Anyone a suggestion for a something like a CausesValidation=false ? :)
thanks!
Klaas Polinder
Hi Klaas,
Thank you for posting in the community.
I have researched the sample you provided and when the form is invalid, changing the selection once does not fire a postback. Changing the selection again, however does fire a postback (the form being invalid still).
Interestingly enough, the same behavior can be observed with an ASP Button with CauseValidation set to false. While the form is invalid, the button causes a postback only after the second click. In this scenario I can suggest that you enable the postback on value changing in your scenario as this seems to work regardless of form validity.
Please let me know if this helps.
Thanks for your answer, but that`s not a solution... Until version 11.1 you can make a postback with the dropdown, regardless of the formvalidity, but no more in version 11.2.
So you can say: "hey look, I can do the same with a asp.net button" but that`s not my question. I'm telling you a bug, so you can solve it... I don`t want to explain to my customers: "yes, it`s ugly but try again and see, it works! Any other questions?"
You can`t ask me that! Infragistcs, this is not working!
Regards,
Hi Petar,
Thanks, that works! :)
Thank you for your reply.
I have researched the matter further and I believe the same issue has been described at:
http://forums.asp.net/t/1554406.aspx
When Page_ClientValidate() is called and returns false, the Page_BlockSubmit variable is set to true, which blocks the first attempt of any control to postback. Setting the variable to false after validating the page on the client should therefore resolve the matter:
function ToggleValid() { if (isValid == true) { document.getElementById('Button1').value = "SetValid" isValid = false; } else { document.getElementById('Button1').value = "SetInValid" isValid = true; } Page_ClientValidate(); Page_BlockSubmit = false; }
function ToggleValid() { if (isValid == true) { document.getElementById('Button1').value = "SetValid" isValid = false; } else { document.getElementById('Button1').value = "SetInValid" isValid = true; }
Page_ClientValidate(); Page_BlockSubmit = false; }