Intersoft WebGrid Documentation
How-to: Get checked rows in server side
See Also Send comments on this topic.

Glossary Item Box

WebGrid provides a RowChecker feature which is very helpful to select multiple rows in WebGrid.

In this topic, you will learn the basic thing on how to get checked rows in server side.

To get checked rows in server side

  1. Add an ASP.NET button and TextBox in WebForm.
  2. On Button1_Click event handler, add this function:

    C# Copy ImageCopy Code
    protected void Button1_Click(object sender, EventArgs e)
    {
      WebGrid1.ClientAction.InvokeScript("test");
      TextBox1.Text = "Checked rows are : \n";
      foreach (string keyValue in WebGrid1.RootTable.GetCheckedRows())
      {
        TextBox1.Text += keyValue + " ; \n";
      }
    }
    

  3. Run the project.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.