hi all,
i hv a refresh button and i want to set first row or previously selected row as selected row after user refreshes the grid.
in the below code, _selectRow is of object type. i am using customobjects in the project so _selectRow will be custom object of type "sample". however, i am unable to set selectedrow using the below code, please let me know if iam missing anything here.
regards,
Sandy
i hv a refresh button and i want to set first row or previously selected row as selected row after user refreshes the grid.
in the below code, _selectRow is of object type. i am using customobjects in the project so _selectRow will be custom object of type "sample". however, i am unable to set selectedrow using the below code, please let me know if iam missing anything here.
regards,
Sandy
if (wipGridView.SelectedItem != null)
_selectedRow = wipGridView.SelectedItem ;
else
{
_selectedRow = wipGridView.Items[0] ;
}
this.Cursor = Cursors.Wait;
LoadWipGrid(_selectedDisplayType);
wipGridView.CurrentItem = _selectedRow;
wipGridView.SelectedItem = _selectedRow;
wipGridView.SetIsCurrent(_selectedRow,
true);
wipGridView.SetIsSelected(_selectedRow,
true);