May 07, 2010, 3:13 PM
[CLOSED] select grid rows with ajax handler
In the code at https://examples1.ext.net/#/GridPane...box_Selection/
It demonstrates SELECTING rows in page load like this.....
protected void Page_Load(object sender, EventArgs e)
{
if (!Ext.IsAjaxRequest)
{
if (!this.IsPostBack)
{
RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
// SELECT A COUPLE OF ROWS
sm.SelectedRows.Add(new SelectedRow(2));
sm.SelectedRows.Add(new SelectedRow(4));
}
}
}
But I can't make this SELECTION work in an ajax handler method. (No error, just no selection.)protected void Button2_Click(object sender, AjaxEventArgs e)
{
RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
// .... BUT THIS DOESNT WORK FOR MANUALLY MAKING A SELECTION....
sm.SelectedRows.Add(new SelectedRow(1));
sm.SelectedRows.Add(new SelectedRow(5));
}
Any suggestions how I can make this work?Thanks, in advance.