Wednesday, March 21, 2012

A form, a treeview, a update panel, and required field validator.

Ok. Lets see if I can explain this. I have a treeview in a uppdate panel. It has an "Add User" node and some "Users" nodes uder it(Siblings). I have a "Add/Edit User" form in the page, inside a panel inside a update panel. This form has a submit command button and the fields have required field validators. These validators are in a ValidationGroup with the submit button. It''s set up so that when a user clicks the "Add User" node, the form panel is made visible so that a new user can be added. When you click on a particular users node, the users information is loaded into the fields and the panel is set to visible so you can edit the users information.


Here's the issue:

When you select the "Add User" node on the tree the blank fields load and all is good. If after that you click on a users node, the users info is loaded into the fields as it should, and that update panel is updated, but all the validators fire. So, selecting a node in the treeview causes the validation to fire even though they are grouped with the Submit button. I expected the validation grouping would solve the issue, but it didn't. Now I'm stumped. Just staring at it.?Any ideas? Anyone?


Thanks,

CL

One issue could be that treeviews aren't supported in updatepanels... We have noticed some strange issues when we were trying to get one work. You may also want to make sure that everything else has causes validation set to false.
Thanks for your reply. I'll look into the causes validation thing and see if that works.
mdenn, you're a dang genius. That worked. Thanks a bunch.

No comments:

Post a Comment