2
Digg me

(NetAdvantage for ASP.NET)

If you want to freeze first few columns like EXCEL and horizontally scroll rest of the columns in Ultra WebGrid here you go…

Event :

UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)

VB Code :

[sourcecode language='vb']
e.Layout.UseFixedHeaders = true
e.Layout.Bands(0).Columns(1).Header.Fixed = true
e.Layout.Bands(0).Columns(2).Header.Fixed = true
[/sourcecode]

Above code freezes the  two columns (second,third) in Grid.

C# Code

[sourcecode language='csharp']
protected void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)
{

e.Layout.UseFixedHeaders = true;
e.Layout.Bands[0].Columns[1].Header.Fixed = true;
e.Layout.Bands[0].Columns[2].Header.Fixed = true;

}
[/sourcecode]