Skip to end of metadata
Go to start of metadata

In some scenarios, multiple column types for different purpose are required to achieve better user-experience.

During this walkthrough, you will learn how to do the following:

  • Create columns which are most suited its objective using our rich ColumnType and EditType.
  • Use JavaScript to show alert.

Prerequisites

In order to complete this walkthrough, you will need the following:

  • Visual Studio 2005 Application.

Step-By-Step Instructions

To create columns using our rich ColumnType and EditType

  1. Binding WebGrid to Hierarchical ISDataSource.
  2. Set the ValueList from column properties:
  3. Add this javaScript function which will later be used when the column colBtn is clicked.

    JavaScript
  4. In the InitializeRow event of the grid, you put codes to set the value for column colCustom whose ColumnType is set to Custom , other than that you also add CustomObjectAttributes for column colBtn which when clicked will execute the javaScript function which has been declared above. You also set the HyperlinkFormatString property for column ProductID.

    JavaScript