Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Problems with ArrayCtrl, GridCtrl in my app
Re: Problems with ArrayCtrl, GridCtrl in my app [message #14150 is a reply to message #14145] |
Fri, 15 February 2008 16:02   |
Alex
Messages: 18 Registered: October 2007 Location: Germany
|
Promising Member |
|
|
Hi,
I hope I have understood what you want to do.
// case 1:
int i = grid.GetCurrentRow();
if(i >= 0)
grid.Remove(i);
0 == false
You are right, there is a problem with IsSelected.
You need to test with IsSelected, otherwise rows also deleted that are not selected. And when the Grid is empty the "vcont.h line 17" error appears.
This seems to work:
// case 1:
int i;
bool sel;
int rowcount;
rowcount = grid.GetCount();
if (rowcount >0)
{
sel = grid.IsSelected();
i = grid.GetCurrentRow();
if( (i >= 0) && sel)
grid.Remove(i);
};
Regards Alex
[Updated on: Fri, 15 February 2008 16:28] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Jun 22 23:59:26 CEST 2025
Total time taken to generate the page: 0.04185 seconds
|