How to keep “schema” of datagridview after DataSource refresh?

I suspect the first line in there is hurting you; the following would be more appropriate.

I suspect the first line in there is hurting you; the following would be more appropriate: xx. DataSource = null; xx. DataSource = GetVCVDataSource(dataTable); Which will rebind without having to worry about a different type in the middle.

Also, at some point earlier (once only): xx. AutoGenerateColumns = false.

Thank you! I knew it is something stupid! It is a part of quiet complex code and I forgot to set up dgw.

AutoGenerateColumns = false; Btw. It looks like that it does not matter if you set DataSource null or typeof(DataTable), both seems to work well in this case. – pesaak Jun 12 at 10:35.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions