Thread Rating:
  • 401 Vote(s) - 2.85 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Worksheetクラスの選択した(複数)行のデータを別のWorksheetクラスに移動する
02-15-2012, 06:40 PM,
#1
Worksheetクラスの選択した(複数)行のデータを別のWorksheetクラスに移動する
次のコードにて、Worksheetクラスの選択した(複数)行のレコードを、
別のWorksheetクラスに移動させたい場合はどのように行えばよいのでしょうか?
>ボタンおよび<ボタンで双方に移動できる処理をCommandButtonのActionイベントで行えばよいかと
思うのですが、記述方法がわかりません。

Code:
{import * from COM.CURL.EXT.WORKSHEET}

{def id-field = "id"}
{def id-name = "name"}
{def id-value = "value"}
{def item-rs1 =
    {RecordSet
        {RecordFields
            {RecordField id-field, domain = int},
            {RecordField id-name, domain = String},
            {RecordField id-value, domain = DataSource.double-domain}
        },
        {RecordData id = 1, name = "A", value = "1.0"},
        {RecordData id = 2, name = "B", value = "2.0"}
    }
}
{def item-rs2 =
    {RecordSet
        {RecordFields
            {RecordField id-field, domain = int},
            {RecordField id-name, domain = String},
            {RecordField id-value, domain = DataSource.double-domain}
        }
    }
}
{def item-ds1 = {RecordSetDataSource item-rs1}}
{def item-ds2 = {RecordSetDataSource item-rs2}}
{def ws1 =
    {Worksheet 4, 3,
        {widths 20pt,50pt,50pt},
        row = 0, col = 0,
        {EmbeddedRecordForm item-ds1, id-field = id-field,
            row = 0, col = 0,
            {FieldSpec id-field},
            {FieldSpec editable? = true, id-name},
            {FieldSpec editable? = true, id-value}
        }
    }
}
{def ws2 =
    {Worksheet 4, 3,
        {widths 20pt,50pt,50pt},
        row = 0, col = 0,
        {EmbeddedRecordForm item-ds2, id-field = id-field,
            row = 0, col = 0,
            {FieldSpec id-field},
            {FieldSpec editable? = true, id-name},
            {FieldSpec editable? = true, id-value}
        }
    }
}
{HBox
    valign="center",
    ws1,
    {VBox
        width = 50pt,
        height = 80pt,
        halign="center",
        {CommandButton
            label = ">",
            width = 20pt,
            height = 20pt,
            {on Action at cb:CommandButton do
                || ws2移動処理
            }
        },
        {CommandButton
            label = "<",
            width = 20pt,
            height = 20pt,
            {on Action at cb:CommandButton do
                || ws1移動処理
            }
        }
    },
    ws2
}


Messages In This Thread
Worksheetクラスの選択した(複数)行のデータを別のWorksheetクラスに移動する - by usami - 02-15-2012, 06:40 PM
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('411')