Set the client instance name on the grid:
ClientInstanceName="YourGrid"
then add a control some where on the page to allow the user to "Select All" like so:
<input id="chkSelectAll" type="checkbox" onclick="YourGrid.SelectAllRowsOnPage(this.checked);" />
Finally in the code behind you can do something like this:
// aColumnName is the name of the column from which you want the value.
private List<object> GetSelectedRowValues(string aColumnName)
{
List<object> values = new List<object>();
string[] valueToGet = { aColumnName };
for (int i = 0; i < YourGrid.VisibleRowCount; i++)
{
if (YourGrid.Selection.IsRowSelected(i))
{
//get the passed in value for the selected rows.
values.Add(YourGrid.GetRowValues(i, valueToGet));
}
}
return values;
}
AGoodDisplayName
2010-02-17 16:53:37