It depends what exactly you are doing when you "refresh" the grid. It sounds like whatever you are doing is causing your DataSource to send a Reset notification. That means that the data has been completely recreated. So the grid throws away all rows and columns and re-creates everything from scratch - so the rows cannot maintain their original state like selection or expansion.
The best thing to do is not cause a reset notification. There may be a better way for you to update your data.
The alternative would be for you to store the states of each row yourself. You can't store the row object itself, because once the reset occurs, the old rows are thrown away and new ones are created. So you would have to store the expanded state of each row based on the data in that row - perhap using the primary key.