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 » U++ SQL » SqlArray and checkboxes
SqlArray and checkboxes [message #2529] Sun, 16 April 2006 23:14 Go to next message
aroman is currently offline  aroman
Messages: 18
Registered: November 2005
Promising Member

I'm having trouble with the following code:

// Defined earlier:
SqlArray mainlist;
SqlId L_LABEL1,L_LABEL2,L_LABEL3;
// (Label 1,2,3 are all BOOLs)

// Problem code:
mainlist.AddColumn(L_LABEL1,"Label1").Ctrls<Option>();
mainlist.AddColumn(L_LABEL2,"Label2").Ctrls<SqlOption>();
static SqlOption edit_label3;
mainlist.AddColumn(L_LABEL3,"Label3").Edit(edit_label3);


The problem is that only the Label3 editing is written to the sqlite db. However, to use it I need to click several times on the row to toggle the label value. The first two both show checkboxes for all entries in the table, but clicking them only changes the display and not the db. I'd like to have the instant-toggle that is available in the first two definitions also committing to the db.

How can I get around this?

- Augusto
Re: SqlArray and checkboxes [message #2553 is a reply to message #2529] Mon, 17 April 2006 19:15 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
aroman wrote on Sun, 16 April 2006 17:14

I'm having trouble with the following code:

// Defined earlier:
SqlArray mainlist;
SqlId L_LABEL1,L_LABEL2,L_LABEL3;
// (Label 1,2,3 are all BOOLs)

// Problem code:
mainlist.AddColumn(L_LABEL1,"Label1").Ctrls<Option>();
mainlist.AddColumn(L_LABEL2,"Label2").Ctrls<SqlOption>();
static SqlOption edit_label3;
mainlist.AddColumn(L_LABEL3,"Label3").Edit(edit_label3);


The problem is that only the Label3 editing is written to the sqlite db. However, to use it I need to click several times on the row to toggle the label value. The first two both show checkboxes for all entries in the table, but clicking them only changes the display and not the db. I'd like to have the instant-toggle that is available in the first two definitions also committing to the db.

How can I get around this?

- Augusto




Oooops, I am sorry, this is an unexpected usage - at the moment, SqlArray does not support ".Ctrls". (Looks like I should start to think about it... Wink

Mirek
Previous Topic: SQL_mySQL reference problems
Next Topic: SqlExp and LIMIT
Goto Forum:
  


Current Time: Mon Apr 29 08:49:19 CEST 2024

Total time taken to generate the page: 0.04125 seconds