10-10-2012 10:30 PM - edited 10-10-2012 10:32 PM
I am writing an API in LVOOP for the .net DataGridView control, mostly becuase I like/want the combobox in the listbox functionality. Everything is going fine but I have run into something kind of strange. In the attached "test.vi" code, if I set the property to allow user to add rows to true after I add a combobox column, things work fine. But, if I set it to false, I get a crash.
Now, if I set the same property to either true or false BEFORE I add this column, I get no crash. I can't seem to reproduce outside of LVOOP so I'm wondering if that is the issue. Could someone let me know if they can reproduce this? I put all the possible cases into diagram disable structures, so you should just have to enable/disable appropriately.
Note: I hope you're familiar with context help, as I have not created icons for my VIs (yet)
Solved! Go to Solution.
10-11-2012 05:48 AM
I see the same thing on 2012, although it's not acutally a crash - LV just gets stuck in the not responding state.
If you make the control larger, this stops happening, presumably because the cell or last row is now visible, so I suspect that there's an unhandled exception or something similar somewhere which LV is waiting on, similar to what's described here - http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/00437163-e197-4ba1-9e95-a3a24...
10-11-2012 09:44 AM
You're right, I shouldn't have said crash so thanks for clarifying. I will look into it further but I'm sure that's the problem. I'll mark the solution once I test it when I get some free time. Thanks for the response.
10-12-2012 09:21 AM
This definitely seems to have been the problem. I'm assuming there is no way I can handle this exception correct; it has to be done in the background by NI? Let me know if there is someway I can catch it otherwise. But I'm guessing it has to be handled by NI to throw error 1172 like all other .net nodes seem to do.
10-13-2012 12:06 PM
I don't think there's anything you can do, but I don't know the details of exception handling in .NET or LV (and we don't even know for sure that that's the problem).
In any case, I would suggest pointing NI towards this issue, as the freezing is probably a LV bug. Since it seems to be affected by the row's visibility, the example could probably be simplified (i.e. no LVOOP).