Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Option error in GridCtrl
|Option error in GridCtrl [message #48182]
||Wed, 31 May 2017 11:54
Registered: March 2017
I have a serious issue with adding an option value to a GridCtrl|
here's the setup code (in parts) of the grid
//some more columns... none a checkbox option
// SQL SELECT
// some calculation for num.... let's say random -100 to 100 to make it easier
bool ord = (num >= 0);
grid.Add(SQL[ID], ord /*,..more columns..*/);
//grid.Sort(6,2,true,true); //num from earlier
And that works just fine, the checkbox is shown, and marked where ord is true unmarked where ord is false,
and sorted correctly, everything's violets in bloom..
Now, when I reorder said grid, check and uncheck the boxes more than once
maybe resort inbetween selecting or deselecting the checkbox option...
at one point the "decreased order sorting for column 1 [checkbox]" shows some "unchecked" boxes in between checked ones.
(as if they were checked but the graphic isn't updating properly)
And they behave just like they were checked while parsing the grid..
if(grid(1) /*&& int(grid(6))>0*/) // checkbox ticked and num > 0
// writing to SQL, exporting to csv...
// nothing too interesting really
parses them and writes corresponding values to the database and the exported csv file.
visually unchecked boxes are still checked somehow *shrugs*
It took me quite a while to reproduce the error myself,
and frankly all I can think of is that "freaking" (that other word) re_numbering of the grid again.
Maybe the Option internally switching to a tri-state or something...
Any ideas on how to prevent that?
the num edit (the only other editable field in the grid) is behaving normal.. btw,
it's just the checkbox (or solely it's graphic) that's not.
that other german guy
[Updated on: Wed, 31 May 2017 12:05]
Report message to a moderator
Current Time: Wed Nov 13 10:36:03 CET 2019
Total time taken to generate the page: 0.03629 seconds