Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Alex is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl - How to Cancel EditMode? And other Problem
Next Topic: Problem w/ HeaderCtrl.SetPaper() in my app.
Goto Forum:
  


Current Time: Sun Jun 22 20:00:16 CEST 2025

Total time taken to generate the page: 0.05968 seconds