Infragistics(R) NetAdvantage(R) Windows Forms
LoadStyle Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridLayout Class : LoadStyle Property

Specifies how rows are loaded. Default value is PreloadRows.

Syntax

Visual Basic (Declaration) 
Public Property LoadStyle As LoadStyle
C# 
public LoadStyle LoadStyle {get; set;}

Example

Following code sets the LoadStyle to LoadnOnDemand before setting the data source.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Set the LoadStyle to LoadOnDemand to improve load time if the 
        'data source has lots of rows. LoadOnDemand delays creation of
        ' UltraGridRow objects until they are needed.
        '
        Me.UltraGrid1.DisplayLayout.LoadStyle = LoadStyle.LoadOnDemand
        Me.UltraGrid1.DataSource = Me.DataSet11
    End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void Form1_Load(object sender, System.EventArgs e)
		{
			// Set the LoadStyle to LoadOnDemand to improve load time if the 
			//data source has lots of rows. LoadOnDemand delays creation of
			// UltraGridRow objects until they are needed.
			//
			this.ultraGrid1.DisplayLayout.LoadStyle = LoadStyle.LoadOnDemand;
			this.ultraGrid1.DataSource = this.dataSet11;
		}

Remarks

Set LoadStyle to LoadOnDemand to load rows as needed instead of loading all rows at once. NOTE: Some operations, like sorting rows, will cause the all rows to be loaded regardless of the load style setting because they require access to all rows. For example if you have a summary that sums the values of a column then when the summary is calculated all the rows will be loaded.

Note: Due to the nature of UltraCombo and UltraDropDown, load-on-demand is not supported on these controls.

See Also