VB.NET Insert DataGridView contents into Database

前端 未结 4 1557
粉色の甜心
粉色の甜心 2021-02-03 16:16

Problem:

I need to dump the contents of my DataGridView into a SQL Server Database Table. I\'ve got the datagridview loading fine, no problems there.

4条回答
  •  无人共我
    2021-02-03 16:32

    For each object in your GridView, you need to find it and determine its value. So for example,

    DropDownList ddlToLoc = (DropDownList)gvMovesMod.Rows[0].FindControl("ddlToLoc");
    

    Then, determine ddlToLoc's SelectedValue and insert to database

提交回复
热议问题