How to disable listbox's click event
Posted
by StupidDeveloper
on Stack Overflow
See other posts from Stack Overflow
or by StupidDeveloper
Published on 2010-03-28T18:11:30Z
Indexed on
2010/03/28
18:13 UTC
Read the original article
Hit count: 386
I have a listbox which acts as a list of items. If you click on some item, it's contents are shown in the panel on the right (few textboxes etc.).
I need to have a validation on these controls as all of them are required fields. And I do have it. The problem is that, even when the validators are not valid, user can click the listbox and change active index (that doesn't have impact on the panel on the right, as SelectedIndexChanged isn't fired).
The validators are standard RequiredFieldValidator with their Display property set to "Dynamic". So, what I want is to disallow the user clicking on the listbox and changing the index untill all validators are Valid.
What would be your solution for that? Is that even possible?
© Stack Overflow or respective owner