Syncfusion Windows窗体网格 – C#

我需要在Syncfusion Windows窗体网格中创build一个带有checkbox的列。 我能够创build一个只有一个checkbox的列,但无法添加旁边的文本。 谁能帮我这个? 我无法在Syncfusion论坛上find任何材料。

这是从Syncfusion的在线文档摘录的代码示例 – WinForms Grid用户指南的第4.1.4.1.1节“在网格单元中添加特殊控制”。

Description属性添加复选框旁边显示的文本。

[C#] // Specify display values for True/False/Indeterminate. gridControl1.TableStyle.CheckBoxOptions = new GridCheckBoxCellInfo("True", "False", "", false); // Set up a check box with no tristate. gridControl1[rowIndex,colIndex].CellValue = false; gridControl1[rowIndex,colIndex].Description = "Click Me"; gridControl1[rowIndex,colIndex].CellType = "CheckBox"; gridControl1[rowIndex,colIndex].TriState = false; // Set up a check box with tristate. gridControl1[rowIndex,colIndex + 1].CellValue = true; gridControl1[rowIndex,colIndex + 1].CellType = "CheckBox"; gridControl1[rowIndex,colIndex + 1].TriState = true; gridControl1[rowIndex,colIndex + 1].Description = "TriState"; [VB.NET] ' Specify display values for True/False/Indeterminate. gridControl1.TableStyle.CheckBoxOptions = New GridCheckBoxCellInfo("True", "False", "", False) ' Set up a check box with no tristate. gridControl1(rowIndex, colIndex).CellValue = False gridControl1(rowIndex, colIndex).Description = "Click Me" gridControl1(rowIndex, colIndex).CellType = "CheckBox" gridControl1(rowIndex, colIndex).TriState = False ' Set up a check box with tristate. gridControl1(rowIndex, colIndex + 1).CellValue = True gridControl1(rowIndex, colIndex + 1).CellType = "CheckBox" gridControl1(rowIndex, colIndex + 1).TriState = True gridControl1(rowIndex, colIndex + 1).Description = "TriState"