Posts Tagged ‘Infragistics’
Locking Cell and Changing Cell Style UltraWebGrid
Refer this article for Column Locking / Freezing in Infragistics Ultra WebGrid
If you need to change background color for a frozen columns then ..
backcolor property must be changed first then cells have to be locked.
e.Layout.Bands(0).Columns(0).CellStyle.BackColor = Drawing.Color.Beige e.Layout.Bands(0).Columns(0).Header.Fixed = True
and in InitializeLayout of ultraWebgrid
Private Sub ultrawebgrid_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.LayoutEventArgs) Handles uwgCategory.InitializeLayout e.Layout.UseFixedHeaders = True End Sub
Column Locking / Freezing in Infragistics Ultra WebGrid
(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 :
e.Layout.UseFixedHeaders = true e.Layout.Bands(0).Columns(1).Header.Fixed = true e.Layout.Bands(0).Columns(2).Header.Fixed = true
Above code freezes the two columns (second,third) in Grid.
C# Code
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; }