ARTICLE

UltraGrid control with dynamic column using VB.Net

Posted by Sonu Chauhan Articles | Visual Basic 2010 February 23, 2006
The following article will explain how to add dynamic column and perform calculation in the dataset.
Download Files:
 
Reader Level:

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.

Methods.

  • 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:

OutPut.gif

share this article :
post comment
 

hi

Posted by palani kumar May 18, 2012

Just downloaded the sample db and it works for 6.1.

Posted by duc huuduc Oct 20, 2008

The following  files Infragistics.Shared,Infragistics.Win and Infragistics.Win.UltraWinGrid are missing.

 

Posted by arun Dec 07, 2006

PUBS database by defaults comes when you install Microsoft SQL server

Posted by Sonu Chauhan May 15, 2006

Just downloaded the sample db and it works for 6.1.

Posted by Ivan Chan May 13, 2006
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Team Foundation Server Hosting
Become a Sponsor