Intersoft WebGrid Documentation
Walkthrough: Configuring password as ColumnType
See Also Send comments on this topic.

Glossary Item Box

This walkthrough shows you how to configure Password as column type in WebGrid.

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

 Prerequisites

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

  • Access to the Microsoft Access Northwind database.
  • Visual Studio 2003 Application.

 Step-By-Step Instructions

To create new web application and set ColumnType as password.

  1. Binding WebGrid to AccessDataSource.
  2. Invoke the WebGrid's InitializeRow server side event to set the CustomerID's column type to password type.

    C# Copy ImageCopy Code

    if(e.Row.Type == ISNet.WebUI.WebGrid.RowType.Record)

    {

    string strCustomerID = e.Row.Cells.GetNamedItem("CustomerID").Text;

    e.Row.Cells.GetNamedItem("CustomerID").Text = "<INPUT type=\"password\" value=\"" + strCustomerID + "\">";

    }

  3. Finally, the WebForm will look like the following snapshot:

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.