Home » U++ Library support » U++ SQL » SqlArray and checkboxes
SqlArray and checkboxes [message #2529] |
Sun, 16 April 2006 23:14 |
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 |
|
mirek
Messages: 13980 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...
Mirek
|
|
|
Goto Forum:
Current Time: Thu May 16 18:52:27 CEST 2024
Total time taken to generate the page: 0.01660 seconds
|