Intersoft WebGrid Documentation
How-to: Select a row from server side
See Also Send comments on this topic.

Glossary Item Box

WebGrid provides features to select a row from server side.

In this topic, you will learn the basic thing on how to select a row from server side.

To Select a row from Server side

  1. Add following codes inside the InitializeRow event handler.

    C# Copy ImageCopy Code
    private void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
    {
            string customerID = e.Row.Cells.GetNamedItem("CustomerID").Text;
            if(customerID == "BLONP")
            {
                    WebGrid1.SetFocus();
                    e.Row.Selected = true;
            }
    }
    

  2. Compile and run the WebForm.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.