Help on Leave & LostFocus Event 
Author Message
 Help on Leave & LostFocus Event

I am using a list view and some textboxes on the form. I am validating the
textbox contents in textbox leave event and setting the focus back to the
same text box if the data is wrong.
If I click on the listview item after typing some wrong data in the text
box, It does the validation and setting the focus to the same textbox, but
surprisingly the 'SelectedIndexChanged' event of the listview also gets
fired leading to undesirable side effects. When the data is wrong, normally
I do not want to perform any other action like selecting an item in the list
view etc.

We have used the list view to display some information and the textboxes to
display the information of selected list view item for editing. we would
like to validate the data in the text boxes before selecting another item in
the list view. How to restrict the selection of another item in the listview
when the validation fails. This is very urgent

Advance Thanks

Ramana



Mon, 31 Oct 2005 14:57:36 GMT  
 Help on Leave & LostFocus Event
Do ListView have BeforeItemClick event or something?


Quote:
> I am using a list view and some textboxes on the form. I am validating the
> textbox contents in textbox leave event and setting the focus back to the
> same text box if the data is wrong.
> If I click on the listview item after typing some wrong data in the text
> box, It does the validation and setting the focus to the same textbox, but
> surprisingly the 'SelectedIndexChanged' event of the listview also gets
> fired leading to undesirable side effects. When the data is wrong,
normally
> I do not want to perform any other action like selecting an item in the
list
> view etc.

> We have used the list view to display some information and the textboxes
to
> display the information of selected list view item for editing. we would
> like to validate the data in the text boxes before selecting another item
in
> the list view. How to restrict the selection of another item in the
listview
> when the validation fails. This is very urgent

> Advance Thanks

> Ramana



Mon, 14 Nov 2005 18:27:51 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. use validate event to replace lostfocus event

2. VB Grid RowColChange Event Vs TextBox LostFocus Event

3. Problem with Focus and LostFocus Events

4. Validating, Validated, LostFocus Event Order

5. LostFocus key event

6. Can't get the LostFocus event jumping from TextBox to MSFlexGrid

7. LostFocus Event Problem

8. MSGBox in LostFocus cancel event GotFocus

9. About LostFocus event

10. How to ABORT a LostFocus Event

11. LostFocus event doesn't fire

12. Not getting LostFocus event w/Toolbar

 

 
Powered by phpBB® Forum Software