GetColumns

GetColumns() As ColumnDefinitions

Event fired to get the column definitions.

Return a new ColumnDefinitions object using dot-chaining. Within the return statement, create a new UpdateGrid.ColumnDefinitions object and call the UpdateControls.Forms.ColumnDefinitions.Add(System.String,System.Type), UpdateControls.Forms.ColumnDefinitions.Add(System.String,System.Type,System.Windows.Forms.DataGridViewCellStyle), UpdateControls.Forms.ColumnDefinitions.AddReadOnly(System.String,System.Type), and UpdateControls.Forms.ColumnDefinitions.AddReadOnly(System.String,System.Type,System.Windows.Forms.DataGridViewCellStyle) methods. These methods return the UpdateGrid.ColumnDefinitions object itself, so they can be chained to gether.

This event must be handled.


Example:

Dot chaining UpdateGrid.ColumnDefinitions


Private Function itemsGrid_GetColumns() As UpdateControls.Forms.ColumnDefinitions
Return New UpdateControls.Forms.ColumnDefinitions() _
.Add("Name", GetType(String)) _
.Add("Price", GetType(Decimal)) _
.Add("Quantity", GetType(Integer)) _
.AddReadOnly("Total", GetType(Decimal))
End Function


Returns:

ColumnDefinitions