Intersoft WebGrid Documentation
How-to: Use HiddenDataMember to get value from hidden column
See Also Send comments on this topic.

Glossary Item Box

Use client side function to get value from hidden column on WebGrid.

This topic will show you how to get the value.

To get value from hidden column using HiddenDataMember

  1. Drag WebGrid instance into the WebForm.
  2. Set HiddenDataMember property to one of column you want to hide, for example : City.
  3. Add a client side function on your code.
  4. Select a row.
  5. You can get grid's value by simply using:

  6. JavaScript Copy ImageCopy Code
    function getdata()
    {

    var grid = ISGetObject("WebGrid1");
    var rowObj = grid.GetSelectedObject().GetRowObject();
    var cells = rowObj.GetCells();
    var customer = cells.GetNamedItem("CustomerID");
    var city = customer.GetElement().attributes["City"].value;
    alert(city);
    }

 

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.