|
-
Mar 20th, 2013, 01:03 AM
#1
Thread Starter
Addicted Member
Validating event firing three times for MSFlexGrid
Hi
We have application developed in VB.NET that uses msflexgrid. We have text box validating event in which data is validated, if not valid CancelEventArgs is set to true . For control combo,button etc it is worked properly,but when msflexgrid is focused textbox validating event is firing three times if CancelEventArgs is set to true . What is the reason for this?How to avoid this?
thank you
-
Mar 20th, 2013, 02:26 AM
#2
Re: Validating event firing three times for MSFlexGrid
My first piece of advice would be to not use old VB6 controls in VB.NET. Is there a specific reason that you can't use a DataGridView? Maybe there is but then again I've seen lots of people do similar things without good reason.
-
Mar 20th, 2013, 06:14 AM
#3
Thread Starter
Addicted Member
Re: Validating event firing three times for MSFlexGrid
 Originally Posted by jmcilhinney
My first piece of advice would be to not use old VB6 controls in VB.NET. Is there a specific reason that you can't use a DataGridView? Maybe there is but then again I've seen lots of people do similar things without good reason.
we are still using msflexgrid because its faster than DataGridView. We tested it by loading much data.
-
Mar 20th, 2013, 06:43 PM
#4
Re: Validating event firing three times for MSFlexGrid
we are still using msflexgrid because its faster than DataGridView. We tested it by loading much data.
I very much doubt that that's true. Using VB6 methods on a VB6 control is probably faster than using VB6 methods on a DGV certainly. But I'd be prepared to bet that used properly the DGV would knock spots off the older control.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Mar 20th, 2013, 11:53 PM
#5
Thread Starter
Addicted Member
Re: Validating event firing three times for MSFlexGrid
Thanks for reply
We will think about using DGV. But for now anyone know why validating event firing 3 times and how to avoid?
-
Mar 21st, 2013, 12:30 PM
#6
Re: Validating event firing three times for MSFlexGrid
We've kinda covered that don't you think? It's an outdated control not correctly programmed for a modern environment so it's going to be unpredicatable in execution. If you want to continue using it you'll have to account for the multi-firing with some kind of flag system. It's extremely unlikely that there's a fix.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|