Forums: 公開ディスカッション (Thread #25072)

gridの使い方について (2010-01-08 21:15 by Anonymous #47808)

gridに関していくつか質問があります。
1.
DBからデータをリモートから取得してgridにセットするときに主キーは非表示にしておき
行選択時してonclickイベント時にその見えなくなっている主キーをリモート側に送りたいのですが可能ですか?
2.
DBからデータをリモートから取得してgridにセットするときに特定の行やセルを選択した状態にしておく方法はあるのでしょうか?
3.
cellActiveをtrueしておいたときのセルの値をリモートに送るにはどうしたらいいでしょうか?

Reply to #47808×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: gridの使い方について (2010-01-13 15:55 by kazatoh #47891)

【お願い】フォーラムでは添付ファイルが使用できないため、以降のご質問は「サポート要求」チケットの登録をお願いします。質問項目ごとにチケットを分けてください。

1. は可能です。

データバインド時に grid の列インデックス番号 (0, 1, 2, ...) とは関係なく、グリッド行に非表示のフィールドを作成することができます。
たとえば、以下のイベント定義では <member> タグの繰り返しの中で <id>, <name>, <address>, <phone> の 4 つのタグが出現しますが、<id> の値はグリッドに表示されないフィールドに格納します。

<result rootNode="response">
 <target out="memberGrid" in="memberlist" inkey="member">
  <bind node="id" tokey="hiddenField"/>
  <bind node="name" tokey="0"/>
  <bind node="address" tokey="1"/>
  <bind node="phone" tokey="2"/>
 </target>
</result>

2. はマスカットの設定ファイルでは実現できないので、JavaScript で処理を記述する必要があります。

リモートイベント処理がグリッドに値を設定した段階で、選択状態はすべて失われます。そのイベントに finish コールバック関数を設定し、grid の selNode(indLine, indCell) メソッドを呼び出すことで選択状態を変更できると思います。なお、引数 indLine, indCell はそれぞれ行インデックス、列インデックスです。

3. についてはご質問の意図がわからなかったので、補足説明をお願いします。
Reply to #47808

Reply to #47891×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: gridの使い方について (2010-01-15 10:26 by Anonymous #47911)

>3. についてはご質問の意図がわからなかったので、補足説明をお願いします。
行単位で処理するなら
<source obj="グリッド名" node="ノード名" fromkey="リモートに送る列"/>
でできるのはわかるのですがセル単位で処理したい場合
fromkey="リモートに送る列"
だと固定の列の位置になってしまいますよね。
cellActiveをtrueにしておいたら行単位ではなくてセル単位での値のやりとりがしたいのです。
1.に関しても行では可能なのはわかりました。セル単位では不可能ですか?

セル単位で処理をしたいのは簡易的な表計算的処理をしたいのです。
セル単位で見えない値に数式を表示する値には計算結果を
そして3.で行ではなくてセル単位の値をリモートに送りたいのは数式計算をさせたいのです。

Reply to #47808

Reply to #47911×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login