private void c1TrueDBGrid1_MouseClick(object sender, MouseEventArgs e)
{
//レコードをセレクト(マウスクリック)
Sid.Text = c1TrueDBGrid1.Columns[“id”].Text;
}
MultiRowで、textBoxCellに値代入
{
gcMultiRow1.SetValue(0, “textBoxCell4”, “改修工事”); //改修工事
}
今日の御ことば
詩篇
25:5 あなたの真理のうちに私を導き、私を教えてください。あなたこそ、私の救いの神、私は、あなたを一日中待ち望んでいるのです。
【KJV】 25:5 Lead me in thy truth, and teach me: for thou art the God of my salvation; on thee do I wait all the day.
MultiRow for Windows Forms 6.0Jで、コンボボックスに動的にデータセット
MultiRow for Windows Forms 6.0Jで、コンボボックスに動的にデータセット
既存のテンプレートのコンボボックス型セルに対して、リストを設定
するには下記のサンプルコードのようにします。
この例では、Template1がデザイナで作成したテンプレートになります。
【サンプルコード】
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GrapeCity.Win.MultiRow;
namespace M100902020
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeMultiRow();
}
private void InitializeMultiRow()
{
// 既存のテンプレートの変更
Template test = new Template1();
ComboBoxCell comboCell = test.Row.Cells[“comboBoxCell1”] as ComboBoxCell;
comboCell.Items.Add(“ガーナ”);
comboCell.Items.Add(“バングラデッシュ”);
comboCell.Items.Add(“ネパール”);
// MultiRowの設定
gcMultiRow1.Template = test;
gcMultiRow1.SetValue(0, “comboBoxCell1”, “ネパール”);
}
}
}