-1

このグリッドに書式を適用するにはどうすればよいですか。ステータス = 保存済みの場合、グリッド ビューのセルを書式設定したいのですが、このテキストを赤で表示して、より目立つようにしたいのです。

// setup columns
            this.grid1.Cell(0, 0).Text = "ID";
            this.grid1.Cell(0, 1).Text = "Scrap Code";
            this.grid1.Cell(0, 2).Text = "Station";
            this.grid1.Cell(0, 3).Text = "Operator";
            this.grid1.Cell(0, 4).Text = "Product";
            this.grid1.Cell(0, 5).Text = "Status";
            this.grid1.Cell(0, 6).Text = "Date Logged";
            this.grid1.Cell(0, 7).Text = "Die";
            this.grid1.Cell(0, 8).Text = "Core Print";
            this.grid1.Cell(0, 9).Text = "Stamp";
            this.grid1.Cell(0, 10).Text = "Line";
            this.grid1.Cell(0, 11).Text = "Grid Ref";
            this.grid1.Cell(0, 12).Text = "Cast Date";
            this.grid1.Cell(0, 13).Text = "Shift";
            this.grid1.Cell(0, 14).Text = "Cast Hour";

            this.grid1.Column(14).Alignment = FlexCell.AlignmentEnum.CenterCenter;

    for (int i=0; i<arrData.Count; i++)
            {
                string[] theData = arrData[i].ToString().Split('\t');

                this.grid1.Cell(i + 1, 0).Text = theData[0];
                this.grid1.Cell(i + 1, 1).Text = theData[5];
                this.grid1.Cell(i + 1, 2).Text = theData[1];
                this.grid1.Cell(i + 1, 3).Text = theData[2];
                this.grid1.Cell(i + 1, 4).Text = theData[11];
                this.grid1.Cell(i + 1, 5).Text = theData[3];
                this.grid1.Cell(i + 1, 6).Text = theData[4].Replace("T", " "); ;
                this.grid1.Cell(i + 1, 7).Text = theData[6];
                this.grid1.Cell(i + 1, 8).Text = theData[12];
                this.grid1.Cell(i + 1, 9).Text = theData[13];
                this.grid1.Cell(i + 1, 10).Text = theData[14];
                this.grid1.Cell(i + 1, 11).Text = theData[7];
                this.grid1.Cell(i + 1, 12).Text = theData[16].Replace("T", " "); ;
                this.grid1.Cell(i + 1, 13).Text = theData[15];
                this.grid1.Cell(i + 1, 14).Text = theData[17];
            }
4

2 に答える 2