标题: grid单元格编辑保存到数据库 [打印本页] 作者: fanye 时间: 2016-11-9 10:45 标题: grid单元格编辑保存到数据库 各位大神,我根据实例http://fineui.com/demo/#/demo/grid/grid_editor_cell.aspx也做了一个页面,但是点保存之后数据库的数据没变化,但是lable3里面显示的内容是对的。后台代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using FineUI;
namespace EmptyProjectNet40_FineUI
{
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGrid();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid1.GetModifiedDict();
foreach (int rowIndex in modifiedDict.Keys)
{
int rowID = Convert.ToInt32(Grid1.DataKeys[rowIndex][0]);