homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

Forum Home Post A Reply

my profile | directory login | | search | faq | forum home


» The Geek Culture Forums » Techno-Talking » Math-a-holics and Code Junkies » Weird bug » Post A Reply


Post A Reply
Login Name:
Password (max 13 characters):
Message Icon: Icon 1     Icon 2     Icon 3     Icon 4     Icon 5     Icon 6     Icon 7    
Icon 8     Icon 9     Icon 10     Icon 11     Icon 12     Icon 13     Icon 14    
Message:

HTML is not enabled.
UBB Code™ is enabled.

 

Instant Graemlins Instant UBB Code™
Smile   Frown   Embarrassed   Big Grin   Wink   Razz  
Cool   Roll Eyes   Mad   Eek!   Confused   Happytears  
blush   Beard of Peter Gabriel!   crazy   tired   ohwell   evil  
shake head   cry baby   hearts   weep   devil wand   thumbsup  
thumbsdown   Geek   Applause   Angel   Envy    
Insert URL Hyperlink - UBB Code™   Insert Email Address - UBB Code™
Bold - UBB Code™   Italics - UBB Code™
Quote - UBB Code™   Code Tag - UBB Code™
List Start - UBB Code™   List Item - UBB Code™
List End - UBB Code™   Image - UBB Code™

What is UBB Code™?
Options


Disable Graemlins in this post.


 


T O P I C     R E V I E W
Stereo
Member # 748
 - posted February 17, 2014 11:30
Hello everyone! Long time since I logged in the forum... But I am very much stumped, and I am not sure the best place to ask, so I thought if my fellow geeks don't know the answer, at least, they'd know where best to ask.

General setting: VB.Net, I have a first combo box which value is used to filter another combo box, both using DataViews filled by a database.

The bug: with production data, the display data doesn't match the value member.

Let's say that the values of the second combo box once filtered, are something like [primary key, foreign key (filtered by the first combo box), "Display data"] {[122, 1, "one value"], [267, 1 "another value"], [520, 1, "a third value"], [etc]}, ordered by the display member.

The Combo box may look like:

(122) a third value
(520) another value
(267) one value

Now, if the data was set to show a previously saved value, say [520, 1, "a third value"], it would lead to having "(520) another value" to be selected. So it shows up wrong to the user, while the value member selected is correct. (I know cause I set a tool tip to show both values, since I couldn't put both in the display part.)

Would anyone have any idea how this could even be possible? For me, it looks like we hit some very weird bug in the Combo Box *or* DataView controls...

Thanks for any input or suggestions!
 
Stereo
Member # 748
 - posted February 17, 2014 16:38
Bug found, if anyone is interested. Apparently, when a combobox with a dataview has its "sorted" parameter set to "true", it will only sort the display data, and leave the values unsorted. (Although it looks like this is not always triggered, I would think the length of the list to be a factor.)
 
TheMoMan
Member # 1659
 - posted February 17, 2014 22:33
Stereo, good to see you back.
 
Stereo
Member # 748
 - posted February 18, 2014 09:50
Thanks, MoMan; I am not sure how "back" I am; With SecondLife and Steampunk interests taking up, I just can't keep up with everything… But I'll try to stop by once in a while! :-)
 
TheMoMan
Member # 1659
 - posted February 18, 2014 12:09
Stereo, I too am getting busy, we are trying to set up a complete APRS packet network to use during SkyWarn. Being off of the beaten path and operators so few and far between, I seem to be doing most of the research.

I have most of the cabling done for my mobile set up and am picking up an extra RX/TX for a base station.
 
Ugh, MightyClub
Member # 3112
 - posted February 18, 2014 14:51
I haven't done any VB work in a while, and never actually dealt with DataViews, so I'm not going to be much help. But I can offer some random high-level thoughts.

Is your test data identical to the production data? If not, then there may be a flaw in the logic that is not exposed by your test data. For example, maybe primary and foreign keys in the test data line up in some way that is not realistic, which just makes you think the code is working.

Does the first combo box have anything to do with the problem? Have you tried *not* filtering the second combo box to see how it behaves on production data in that case?

By the way is the problem with the second combo box that the displayed description for an item doesn't match the primary key? If so, is that always the case, or only when a selection was previously saved?

Have you tried connecting the DataView to a different control type to eliminate the ComboBox control as the culprit? Ideally you might want to write a bit of code to iterate over the DataView and manually write the contents to the screen or a log file as text so you can be sure what is being passed to the control.
 




Contact Us | Geek Culture Home Page

© 2015 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0



homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam