且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

保存并加载datagridview

更新时间:2023-02-02 19:12:56





要填充Datagrid,您需要将其与任何数据集或数据表连接。



要从Gridview加载或保存数据,它很容易保存文件格式为XML或JSON格式。



您也可以使用数据集直接导出为XML格式。



您可以浏览Gridview来制作自定义数据表或数据集..



如果您不需要创建数据表或数据集,那么可以通过网格中的每一行,然后转换为Datarow然后执行wh在任何时候你需要用它...





谢谢,

Ullas
Hi,

To fill a Datagrid you need to connect it with any Dataset or Datatable.

To load or save data from Gridview its easy to save the file in to XML or JSON format.

You can also use Dataset to export directly to XML format.

You can travel through the Gridview to make a custom datatable or dataset..

if you don't need to create a datatable or data set, then travel through each rows in the grid and then convert in to Datarow and then do what ever you need to do with it...


Thanks,
Ullas