Datagrid
DataGridView is easy to use, but if the amount of data is larger then there will be a performance problem. The general approach provided online is to accelerate through virtual mode. But sometimes, you can speed up DataGridView with simple settings.
(1) Use bound data. is to interact with Datagridview.datasource by loading the DataTable and then through BindingSource.
(2) Do not use Autosizecolumnsmode.allcells. If so, DataGridView will not be displayed until all the cells have been drawn. Because the width of the column is determined by the longest cell in the column. If you change to Displayedcells, you can determine the width of the column as long as the portion of the display is drawn.
(3) Where possible, use AutoGenerateColumns to derive from the dynamic set column.
In the practical application, a 10000*20 about the DataGridView, the original display efficiency is about 100s, using the above method became 6s. The effect is still more obvious.
Of course, if you want to accelerate the amount of data, you still need to use virtual mode. After all, the above method is only a temporary need.