Accessing the selected rows in a WebCombo requires accessing its underlying WebGrid control. The following example uses the AfterSelectChange client-side event of the WebCombo to get the selected row's cell values, and displays each value in an alert() dialog.
In JavaScript:
function WebCombo1_AfterSelectChange(webComboId)
{
// get the combo from the passed-in id
var combo = igcmbo_getComboById(webComboId);
// get the currently selected row in webcombo
var index = combo.getSelectedIndex();
// get grid reference from webcombo
var grid = combo.getGrid();
// get selected row in grid
var row = grid.Rows.getRow(index);
// get cell values in row
alert(row.getCell(0).getValue());
alert(row.getCell(1).getValue());
alert(row.getCell(2).getValue());
alert(row.getCell(3).getValue());
}
Wednesday, December 3, 2008
Retrieve value of the selected rows in WebCombo on the client
Posted by Suryan at 11:44 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment