GrapeCity.Win.MultiRow Namespace > Cell Class : DataField Property |
<TypeConverterAttribute("GrapeCity.Win.MultiRow.Design.DataFieldConverter,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.DataFieldEditor,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <SRCategoryAttribute("Data")> <SRDescriptionAttribute("Indicates the name of the data source field to which the Cell is bound.")> Public Property DataField As String
[TypeConverter("GrapeCity.Win.MultiRow.Design.DataFieldConverter,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.DataFieldEditor,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [SRCategory("Data")] [SRDescription("Indicates the name of the data source field to which the Cell is bound.")] public string DataField {get; set;}
Template CreateDataBindingTamplate() { TextBoxCell idCell = new TextBoxCell(); // Binding a data source column. // The DataField should be equal to a column name in the 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 DataField property should be equal to a column name in the 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
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2