CheckBoxCellのTrueValueとFalseValueプロパティの値を参照するには、CheckBoxCell.EditedFormattedValueプロパティの値を元にそれぞれのプロパティを直接参照します。
サンプルコード
Imports GrapeCity.Win.MultiRow Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim CheckBoxCell1 As New CheckBoxCell() CheckBoxCell1.TrueValue = "Yes" CheckBoxCell1.FalseValue = "No" GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {CheckBoxCell1}) End Sub Private Sub GcMultiRow1_CellEditedFormattedValueChanged(ByVal sender As System.Object, ByVal e As GrapeCity.Win.MultiRow.CellEditedFormattedValueChangedEventArgs) Handles GcMultiRow1.CellEditedFormattedValueChanged Dim gcMultiRow As GcMultiRow = TryCast(sender, GcMultiRow) Dim currentCell As Cell = gcMultiRow.Rows(e.RowIndex).Cells(e.CellIndex) If currentCell.IsInEditMode Then If TypeOf currentCell Is CheckBoxCell Then Dim CheckBoxCell1 As CheckBoxCell = TryCast(currentCell, CheckBoxCell) If DirectCast(CheckBoxCell1.EditedFormattedValue, Boolean) Then Console.WriteLine(CheckBoxCell1.TrueValue) Else Console.WriteLine(CheckBoxCell1.FalseValue) End If End If End If End Sub
using GrapeCity.Win.MultiRow; private void Form1_Load(object sender, EventArgs e) { CheckBoxCell checkBoxCell1 = new CheckBoxCell(); checkBoxCell1.TrueValue = "Yes"; checkBoxCell1.FalseValue = "No"; gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { checkBoxCell1 }); gcMultiRow1.CellEditedFormattedValueChanged += new EventHandler<CellEditedFormattedValueChangedEventArgs>(gcMultiRow1_CellEditedFormattedValueChanged); } private void gcMultiRow1_CellEditedFormattedValueChanged(object sender, CellEditedFormattedValueChangedEventArgs e) { GcMultiRow gcMultiRow = sender as GcMultiRow; Cell currentCell = gcMultiRow.Rows[e.RowIndex].Cells[e.CellIndex]; if (currentCell.IsInEditMode) { if (currentCell is CheckBoxCell) { CheckBoxCell checkBoxCell1 = currentCell as CheckBoxCell; if ((bool)checkBoxCell1.EditedFormattedValue) { Console.WriteLine(checkBoxCell1.TrueValue); } else { Console.WriteLine(checkBoxCell1.FalseValue); } } } }