Template CreateDataBindingTamplate()
{
TextBoxCell idCell = new TextBoxCell();
// Binding a column of data source.
// The value of DataField property should a exist column name in data source.
idCell.DataField = "ID";
TextBoxCell nameCell = new TextBoxCell();
nameCell.DataField = "Name";
CheckBoxCell genderCell = new CheckBoxCell();
genderCell.DataField = "Gender";
Cell[] cells = new Cell[] { idCell, nameCell, genderCell };
return Template.CreateGridTemplate(cells);
}
Private Function CreateDataBindingTamplate() As Template
Dim idCell As New TextBoxCell()
' Binding a column of data source.
' The value of DataField property should a exist column name in data source.
idCell.DataField = "ID"
Dim nameCell As New TextBoxCell()
nameCell.DataField = "Name"
Dim genderCell As New CheckBoxCell()
genderCell.DataField = "Sex"
Dim cells As Cell() = New Cell() {idCell, nameCell, genderCell}
Return Template.CreateGridTemplate(cells)
End Function