0

c# の smartDevice プロジェクトで、DataGrid の最初の色のみの色を変更しようとしています。「ペイント」イベントを使用しようとしましたが、問題を解決できるかどうかわかりませんでした。Microsoft Visual Studio 2008 を使用しています。

これはテストコードです

private void buttonRed_Click(object sender, EventArgs e)
    {
        DataRow row = this.dataSet1.Tables[0].NewRow();
        row[0] = "002";
        row[1] = "E";
        this.dataSet1.Tables[0].Rows.InsertAt(row, 0);
    }
    private void load()
    {

        this.dataSet1.Tables[0].Rows.Add(new object[] { "001", "A" });
        this.dataSet1.Tables[0].Rows.Add(new object[] { "002", "B" });
        this.dataSet1.Tables[0].Rows.Add(new object[] { "001", "C" });
        this.dataSet1.Tables[0].Rows.Add(new object[] { "003", "D" });
    }
    private void buttonGreen_Click(object sender, EventArgs e)
    {
        DataRow row = this.dataSet1.Tables[0].NewRow();
        row[0] = "004";
        row[1] = "F";
        this.dataSet1.Tables[0].Rows.InsertAt(row, 0);
    }
4

1 に答える 1