我试图向Ultragrid添加一个复选框列。
但是Ultragrid没有复选框。 刚刚选中或未选中的文本... 或正确或错误的文字...
UltraGridColumn ugc = e.Layout.Bands[0].Columns.Add(key, caption);
ugc.DataType = typeof(bool);
ugc.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox;
答案 0 :(得分:0)
Private Sub FormatMyBooleanFields()
uchk.CheckAlign = Drawing.ContentAlignment.MiddleCenter
With ug.Rows.Band
For i As Integer = 0 To .Columns.Count - 1
If .Columns(i).DataType Is GetType(Boolean) Then
ug.Rows.Band.Columns(i).EditorComponent = uchk
End If
Next
End With
End Sub