Overload | Description |
---|---|
Item(Int32) | Gets the Field object at the specified indexed location in the FieldCollection. |
Item(String) | Gets the Field object with the specified name in the FieldCollection. |
This is the default property for the FieldCollection.
C# | Copy Code |
---|---|
private void UnboundGrp_DataInitialize(object sender, System.EventArgs eArgs) { Fields.Add("CategoryID"); Fields.Add("CategoryName"); Fields.Add("ProductName"); Fields.Add("UnitsInStock"); Fields.Add("Description"); Fields.Add("TotalLabel"); System.Windows.Forms.MessageBox.Show (this.Fields[1].Name.ToString()); } |
Visual Basic | Copy Code |
---|---|
Private Sub rptUnboundGrp_DataInitialize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.DataInitialize Fields.Add("CategoryID") Fields.Add("CategoryName") Fields.Add("ProductName") Fields.Add("UnitsInStock") Fields.Add("Description") Fields.Add("TotalLabel") MessageBox.Show(Me.Fields.Item(1).Name.ToString) End Sub |