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.
if (wipGridView.SelectedItem != null)
_selectedRow = wipGridView.SelectedItem ;
_selectedRow = wipGridView.Items ;
this.Cursor = Cursors.Wait;
wipGridView.CurrentItem = _selectedRow;
wipGridView.SelectedItem = _selectedRow;