Intersoft WebGrid Documentation
How-to: Retrieve Preview Row's text
See Also Send comments on this topic.

Glossary Item Box

WebGrid Preview Row's text can be obtained in client side.

In this topic, you will learn how to get the preview row text in WebGrid.

To get Preview Row's text in WebGrid

  1. Drag WebGrid to your form and bind it .
  2. Specify the PreviewRow settings in the grid.
  3. Create a function at the client side and use following code.

  4. JavaScript Copy ImageCopy Code
    var grid = ISGetObject("WebGrid1");
    var selRow = grid.GetSelectedObject().GetRowObject();
    var rootRow = wgGetRootRow(selRow); 
    alert(rootRow.keyValue); // return "2"; 
    
    var prRow = wgGetPreviewRow(rootRow);
    var prCell = wgGetPreviewRowCell(prRow); 
    alert(prCell.innerText);
    

  5. Run the project. 

 

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.