UltraGrid control with dynamic column using VB.Net

In the following article you can see that how to use Infragistic UltraGrid control. Without getting into much theoretical things we will see the features available for UltraGrid control by the sample code.


In the following article we have used the PUBS database.

Before we start have a look of the following -


Some of The Public Events:-

  • AfterCellActivate - Occurs after a cell becomes active.
  • AfterCellCancelUpdate - Occurs after the user cancels changes to a cell's value by pressing the ESC key.
  • AfterRowCollapsed - Occurs after a row that has children has been collapsed.
  • AfterRowExpanded - Occurs after a row with children has been expanded.
  • AfterRowFilterChanged AfterRowFilterChanged - Event gets fired after the user has modified row filters for a column.
  • AfterRowInsert - Occurs after a new row is inserted.
  • AfterRowLayoutItemResized - This event is fired after the user has resized a column
  • ChangeUICues (Inherited from System.Windows.Forms.Control)
  • Click (Inherited from System.Windows.Forms.Control)
  • ClickCellButton - Occurs when a column is using the Button or EditButton style and the user clicks a cell's button.
  • ControlAdded (Inherited from System.Windows.Forms.Control)
  • ControlRemoved (Inherited from System.Windows.Forms.Control)
  • DoubleClick (Inherited from System.Windows.Forms.Control)
  • DragDrop (Inherited from System.Windows.Forms.Control)
  • DragEnter (Inherited from System.Windows.Forms.Control)
  • HelpRequested (Inherited from System.Windows.Forms.Control)
  • InitializeLayout - Occurs when the display layout is initialized, such as when the control is loading data from the data source.
  • InitializePrint - Occurs when a print job is first initiated by invoking the Print method.
  • InitializePrintPreview - Occurs when a print preview is first initiated by invoking the PrintPreview method.
  • InitializeRow - Occurs when a row is initialized
  • KeyDown (Inherited from System.Windows.Forms.Control)
  • KeyPress (Inherited from System.Windows.Forms.Control)
  • KeyUp (Inherited from System.Windows.Forms.Control)
  • Layout (Inherited from System.Windows.Forms.Control)
  • MouseHover (Inherited from System.Windows.Forms.Control)

Some of the Properties.

  • ShowKeyboardCues (Inherited from System.Windows.Forms.Control) - Gets a value indicating whether the control should display keyboard shortcuts.
  • SubObjectPropChangeHandler (Inherited from UltraGridBase) - Returns the event handler that notifies OnSubObjectPropChanged.
  • SupportsPrinting - Overridden. Returns true if the control supports printing.


  • CreateControlsInstance (Inherited from System.Windows.Forms.Control) - Creates a new instance of the control collection for the control
  • CreateHandle (Inherited from System.Windows.Forms.Control) - Creates a handle for the control.
  • DefWndProc (Inherited from System.Windows.Forms.Control).
  • DestroyHandle (Inherited from System.Windows.Forms.Control) - Destroys the handle associated with the control.
  • DrawControl (Inherited from Infragistics.Win.UltraControlBase) Overloaded.
  • Finalize (Inherited from System.ComponentModel.Component).
  • FireAfterColPosChanged Overridden. - Called after a column's position has changed.
  • FireAfterGroupPosChanged Overridden. - Called after a group's position has changed.
  • FireAfterRowRegionScroll Overridden. - Called after row region scroll takes place.
  • FireBeforeColPosChanged Overridden. - Called before a column's position has changed.

When you start first add the reference of the following.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

You can download the sample and the output will be: