Intersoft Support Center

Customize Column Freezing

WebGrid provides methods to freeze/unfreeze WebGrid column at runtime, change the FreezePane splitter line's appearance from designer.

With AbsoluteScrolling enabled, WebGrid is also able to automatically adjust the viewport to the next available column when user pressed on the left/right arrow of horizontal scrollbar. This behavior allows users to conveniently scroll through all the columns with less clicks.

In this topic, you will learn how to customize column freezing.

To allow user to freeze/unfreeze at runtime

  1. Bind WebGrid to AccessDataSource (Using Customers table from NorthWind data source).
  2. Open WebGrid SmartTag and check Allow Column Freezing.
  3. Open WebGrid Designer - Layout Settings.
  4. Search for FreezePaneSettings.
  5. Set ShowInContextMenu to True.

Try to right click on WebGrid header (CompanyName) then click Freeze Pane.


The result is CustomerID and CompanyName columns will become freeze columns.

To change splitter line's appearance

  1. Follow steps on the topic above (To allow user to freeze/unfreeze at runtime).
  2. Open WebGrid designer.
  3. Search for FreezePaneSettings.
  4. Set SplitterLineColor to ForestGreen.
  5. Set SplitterLineWidth to 5.

To enable absolute scrolling

  1. Follow steps on the topic above (To allow user to freeze/unfreeze at runtime).
  2. Open WebGrid designer.
  3. Search for FreezePaneSettings.
  4. Set AbsoluteScrolling to True.
Previous Next