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 » Repeated Question: How to use Clipboard in DB(SqLite3)?
Repeated Question: How to use Clipboard in DB(SqLite3)? [message #13331] Wed, 02 January 2008 02:40 Go to next message
fuqr is currently offline  fuqr
Messages: 16
Registered: July 2007
Location: Singapore
Promising Member
Dear UPP experts,
Happy New Year!

I tried Clipboard() in HomeBudget:
==========================================================
.........
categories.WhenInsertRow = THISBACK(InsertCategory);
.........
categories.Appending().Removing().Editing().Clipboard();
..........
============================================================ =
But When copy any multiple rows, only one row data can be done when "paste as Appended".
The SQL statement in recorded file show the data in cell are NULL:
"SQL* insert into CATEGORIES(GR_ID, NAME, DEFVALUE, PM, INNEWMONTH) values (4, NULL, NULL, -1, 0)..."

Maybe it's a UPP bug?

I also noticed that the Paste and write to SQLite3 function can be coded as follows:
===================================
void gridctrl::Paste(int mode)
{
if(!clipboard)
return;
Gridclipboard gc = Getclipboard();
if(gc.data.IsEmpty())
....................
======================================
But what is the name(XXX) of the CALLBACK I can use like below:
categories.XXX = THISBACK1(Paste,a);

Thanks in Advance.
Razz
Re: Repeated Question: How to use Clipboard in DB(SqLite3)? [message #13349 is a reply to message #13331] Wed, 02 January 2008 19:00 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

During pasting grid should call WhenInsertRow for each inserted row. In theory everything should be fine Smile I'll check it ASAP
Re: Repeated Question: How to use Clipboard in DB(SqLite3)? [message #13456 is a reply to message #13349] Wed, 09 January 2008 07:27 Go to previous message
fuqr is currently offline  fuqr
Messages: 16
Registered: July 2007
Location: Singapore
Promising Member
Hi Daniel,

Following is my testing details for above mentioned problem. It is also related to the discussion issue:"Range paste for Gridctrl".

1).Clipboard function added in HomeBudget only by one statment:
...
categories.Appending().Removing().Editing().Clipboard(true);
...

2).Two categories groups created in execution.

3).Problem by single row copy&paste: (in group-1)
Select single row in "Categories" -> MB3 -> copy -> MB3 -> paste as appended.
It seems ok in table display. But,
Select another group -> select changed group again.
You can find the new paste doesn't been added in SQLite3 DB and display in table as well.

4).Problem by multiple rows copy&paste:
Select multi rows with "Shift" key -> MB3 -> copy -> MB3 -> paste as appended -> Select another group -> select changed group again. result (both in db & table):
last row is ok, 1st row missing, and first two column data of all other rows missing.

To save data to SQLite3, maybe I need to add addtional Paste routine in InsertCategory() and other functions especially for Clipboard data?

b.t.w. "Gridclipboard gc = Getclipboard();" doesn't work when I tried to add some codes.

Thanks for your help! Razz /Qinrong
Previous Topic: Howto disable Insert and Append?
Next Topic: Problem with sort of the array with embedded ctrl
Goto Forum:
  


Current Time: Tue May 14 17:05:41 CEST 2024

Total time taken to generate the page: 0.01969 seconds