DataGridView column order does not seem to work

前端 未结 4 527
再見小時候
再見小時候 2020-12-20 21:20

I have a DataGridView bound to a list of business objects:

Dim template As New IncidentTemplate
Dim temps As List(Of IncidentTemplate) = template.LoadAll
Dim         


        
4条回答
  •  抹茶落季
    2020-12-20 21:44

    I stumbled on your post while looking to solve a similar problem. I finally tracked it down by doing as you mention (using the DisplayIndex property) and setting the AutoGenerateColumns property of the DataGridView to false. This property is not visible in the designer, so I just added it to the constructor for my form. Be sure to do this before setting the data source for your grid.

    Hope this helps...

提交回复
热议问题