I have a requirement to freeze the first column of the grid and also keep its header fixed. The remaining columns of the grid should not be frozen and I should be able to resize the columns. The grid should be scrollable both verically and horizontally.
I have implemented the above stated requirement using infragisctics UltraWebGrid and I could make the first column frozen and the grid scrollable. But when I try to resize the remaining columns of the grid, some run-time javascript error is thrown. The error is:
" 'undefined' is null or not an object"
I am not able to resolve this issue. Kindly help me with is.
Below is the code for the InitializeLayout event of the grid with 4 columns.
Protected Sub UltraGrid_InitializeLayout(ByVal sender As Object, ByVal e As LayoutEventArgs) Handles UltraWebGrid1.InitializeLayout
e.Layout.UseFixedHeaders =
True
e.Layout.AutoGenerateColumns =
False
e.Layout.TableLayout =
TableLayout.Auto
e.Layout.AllowColSizingDefault =
AllowSizing.Free
e.Layout.AllowSortingDefault =
AllowSorting.OnClient
e.Layout.RowHeightDefault = Unit.Percentage(10)
e.Layout.HeaderClickActionDefault =
HeaderClickAction.NotSet
e.Layout.RowSelectorsDefault =
RowSelectors.Yes
e.Layout.RowSizingDefault =
e.Layout.StationaryMargins =
StationaryMargins.HeaderAndFooter
e.Layout.ViewType =
ViewType.Flat
e.Layout.SelectTypeCellDefault =
SelectType.Extended
e.Layout.SelectTypeRowDefault =
UltraWebGrid1.Bands(0).SortedColumns.Add(UltraWebGrid1.Columns(1))
UltraWebGrid1.Bands(0).SortedColumns.Add(UltraWebGrid1.Columns(2))
With e.Layout.Bands(0).Columns(0)
.AllowUpdate =
AllowUpdate.Yes
.AllowResize = AllowSizing.Fixed
.Header.Fixed =
End With
With
e.Layout.Bands(0).Columns(1)
.SortIndicator =
SortIndicator.Ascending
.AllowResize =
.Header.ClickAction =
HeaderClickAction.SortMulti
e.Layout.Bands(0).Columns(2)
HeaderClickAction.SortSingle
e.Layout.Bands(0).Columns(3)
SortIndicator.Disabled
End Sub