[英]how to get data from a datagridview and insert into database without using databinding?
i ve a datagrid and wen a button s clicked i want the values from the datadrid to the database.. 我有一个数据网格并单击了一个按钮,我希望将值从datadrid传递到数据库。
without databind to dataset/datatable.. 没有数据绑定到数据集/数据表。
thanx in advance 预先感谢
You should databind to something. 您应该将数据绑定到某物。
Use a List<> or better BindingList<> of a simple class that has properties for each column in your Db. 使用一个List <>或更好的BindingList <>的简单类,该类具有Db中每个列的属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.