Winform DataGridView使用最佳方法

一般使用到DataGridView控件的都是涉及到多数据显示及更改。

非数据库最好使用一个类写个model:

internal class DataModel

{

public int id {get;set}

public string name{get;set}

public string tel{get;set}

……

 

}

 

然后在DataGridView数据绑定此对象

重新加载数据的时候要先清空DataGridView里面的数据再加载。

posted on 2023-04-20 19:14  8888888888888  阅读(43)  评论(0编辑  收藏  举报

导航

Live2D