C# WinForms DataGridView background color rendering too slow

后端 未结 5 1818
挽巷
挽巷 2021-02-20 14:52

I\'m painting my rows in a DataGridView like this:

private void AdjustColors()
    {            
        foreach (DataGridViewRow row in aufgabenDataGridView.Row         


        
5条回答
  •  名媛妹妹
    2021-02-20 15:44

    Its probably the Enum.Parse call, it has poor performance. You should try and change it to a dictionary lookup to see if that improves performance. See this post

提交回复
热议问题