Apr 01, 2013, 5:09 PM
I can't get the GridPanel SelectedRow from an ascx control loaded dynamically
Hi EveryBody
I have a main page that load dynamically an ascx control which contain a grid.
I have a button designed to edit a Row line by DirectClick Event. The event is fired but I can't get GridPanel SelectedRow. The followed lines throw an error.
I have a main page that load dynamically an ascx control which contain a grid.
I have a button designed to edit a Row line by DirectClick Event. The event is fired but I can't get GridPanel SelectedRow. The followed lines throw an error.
RowSelectionModel sm = this.GridPanel1.GetSelectionModel() as RowSelectionModel;
SelectedRow rowSelected = sm.SelectedRows[0];
eg. In OnInit method of the main page i load the ascx control.
Last edited by Daniil; Apr 02, 2013 at 5:01 AM.
Reason: Please use [CODE] tags