谢谢
16 个解决方案
#1
doubleclick 事件
#2
你是在什么情况下面出现这样的问题啊,请描述详细一点啊!
#3
doubleclick 事件 ? 请说详细点
这是我的编辑触发时间
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
这是我的编辑触发时间
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
#4
崩溃,自己顶一下。 在地球仰望月球
#5
我也想知道呢
#6
自己在顶~~~~~~~~~~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#7
代码太少,无法判断。
#8
我没有碰到这样的问题
你在GridView1.EditIndex = e.NewEditIndex;
后面+句GridView1.DataBind();
试试看
#9
我没有碰到这样的问题
你在GridView1.EditIndex = e.NewEditIndex;
后面+句GridView1.DataBind();
试试看
#10
不行,做不出来
不过还是要谢谢你,还有什么好办法吗?
请知道的高速我一声
不过还是要谢谢你,还有什么好办法吗?
请知道的高速我一声
#11
public partial class mianban : System.Web.UI.Page
{
System.Data.OleDb.OleDbCommand OleSelectDbCommand1;
System.Data.OleDb.OleDbConnection OleDbConnetion1;
System.Data.OleDb.OleDbDataAdapter OleDbDataAdapter1;
System.Data.OleDb.OleDbCommand OleUpdataDbCommand1;
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "欢迎光临" + Request.QueryString["id"];
if (!IsPostBack)
{
data();
}
}
private void data()
{
OleDbConnetion1 = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ; Data Source=G:\denglu\guanli.mdb");
OleDbConnetion1.Open();
OleSelectDbCommand1 = new System.Data.OleDb.OleDbCommand("select * from kucunbiao ", OleDbConnetion1);
OleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
OleDbDataAdapter1.SelectCommand = OleSelectDbCommand1;
DataSet ds = new DataSet();
OleDbDataAdapter1.Fill(ds);
OleDbDataAdapter1.SelectCommand.ExecuteReader();
GridView1.DataSource = ds ;
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write("<script language='javascript'>alert('请先取消')</script>");
}
这是代码 我是菜鸟,写的不好,大家别笑话
帮我看看到底是怎么回事,很郁闷亚!!~~
{
System.Data.OleDb.OleDbCommand OleSelectDbCommand1;
System.Data.OleDb.OleDbConnection OleDbConnetion1;
System.Data.OleDb.OleDbDataAdapter OleDbDataAdapter1;
System.Data.OleDb.OleDbCommand OleUpdataDbCommand1;
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "欢迎光临" + Request.QueryString["id"];
if (!IsPostBack)
{
data();
}
}
private void data()
{
OleDbConnetion1 = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ; Data Source=G:\denglu\guanli.mdb");
OleDbConnetion1.Open();
OleSelectDbCommand1 = new System.Data.OleDb.OleDbCommand("select * from kucunbiao ", OleDbConnetion1);
OleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
OleDbDataAdapter1.SelectCommand = OleSelectDbCommand1;
DataSet ds = new DataSet();
OleDbDataAdapter1.Fill(ds);
OleDbDataAdapter1.SelectCommand.ExecuteReader();
GridView1.DataSource = ds ;
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write("<script language='javascript'>alert('请先取消')</script>");
}
这是代码 我是菜鸟,写的不好,大家别笑话
帮我看看到底是怎么回事,很郁闷亚!!~~
#12
你得重新 梆定 一下 我也遇到這樣得問題了
#13
if (GridView1.EditIndex == -1)
editIndex=-1是取消编辑状态啊
你把这个方法改下看看
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write(" <script language='javascript'>alert('请先取消') </script>");
}
改成:
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}
我一直是这样写的没有出现过你这样的事情啊.
在不行你就跟踪调式下.
看看那里错了
editIndex=-1是取消编辑状态啊
你把这个方法改下看看
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write(" <script language='javascript'>alert('请先取消') </script>");
}
改成:
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}
我一直是这样写的没有出现过你这样的事情啊.
在不行你就跟踪调式下.
看看那里错了
#14
你们说的方法我都试过了,也跟踪过了 就是不知道错在那里
高人们 帮帮忙呀 !!!~~~~
高人们 帮帮忙呀 !!!~~~~
#15
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
//重新绑定数据,必须重新绑
Bind();
}
我也遇见了,重新绑定数据就没事了,一次点击就成功了
{
GridView1.EditIndex = e.NewEditIndex;
//重新绑定数据,必须重新绑
Bind();
}
我也遇见了,重新绑定数据就没事了,一次点击就成功了
#16
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind(); //不知道你们是怎么做的,我加了这一行后表格就没有了
}
但如果只要前面的那一行,我也和楼主一样要点两次才会出来,取消按钮根本就没鸟用,它相当于javascript的history.back();一直跳来跳去。真搞不懂MS是如何定义这个控件的事件的,以前的DataGrid控件就可以直觉使用,
private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//使當前行處於編輯狀態
this.DataGrid1.EditItemIndex = e.Item.ItemIndex;
//需要再次綁定數據
this.BindData();
}
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind(); //不知道你们是怎么做的,我加了这一行后表格就没有了
}
但如果只要前面的那一行,我也和楼主一样要点两次才会出来,取消按钮根本就没鸟用,它相当于javascript的history.back();一直跳来跳去。真搞不懂MS是如何定义这个控件的事件的,以前的DataGrid控件就可以直觉使用,
private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//使當前行處於編輯狀態
this.DataGrid1.EditItemIndex = e.Item.ItemIndex;
//需要再次綁定數據
this.BindData();
}
#1
doubleclick 事件
#2
你是在什么情况下面出现这样的问题啊,请描述详细一点啊!
#3
doubleclick 事件 ? 请说详细点
这是我的编辑触发时间
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
这是我的编辑触发时间
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
#4
崩溃,自己顶一下。 在地球仰望月球
#5
我也想知道呢
#6
自己在顶~~~~~~~~~~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#7
代码太少,无法判断。
#8
我没有碰到这样的问题
你在GridView1.EditIndex = e.NewEditIndex;
后面+句GridView1.DataBind();
试试看
#9
我没有碰到这样的问题
你在GridView1.EditIndex = e.NewEditIndex;
后面+句GridView1.DataBind();
试试看
#10
不行,做不出来
不过还是要谢谢你,还有什么好办法吗?
请知道的高速我一声
不过还是要谢谢你,还有什么好办法吗?
请知道的高速我一声
#11
public partial class mianban : System.Web.UI.Page
{
System.Data.OleDb.OleDbCommand OleSelectDbCommand1;
System.Data.OleDb.OleDbConnection OleDbConnetion1;
System.Data.OleDb.OleDbDataAdapter OleDbDataAdapter1;
System.Data.OleDb.OleDbCommand OleUpdataDbCommand1;
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "欢迎光临" + Request.QueryString["id"];
if (!IsPostBack)
{
data();
}
}
private void data()
{
OleDbConnetion1 = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ; Data Source=G:\denglu\guanli.mdb");
OleDbConnetion1.Open();
OleSelectDbCommand1 = new System.Data.OleDb.OleDbCommand("select * from kucunbiao ", OleDbConnetion1);
OleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
OleDbDataAdapter1.SelectCommand = OleSelectDbCommand1;
DataSet ds = new DataSet();
OleDbDataAdapter1.Fill(ds);
OleDbDataAdapter1.SelectCommand.ExecuteReader();
GridView1.DataSource = ds ;
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write("<script language='javascript'>alert('请先取消')</script>");
}
这是代码 我是菜鸟,写的不好,大家别笑话
帮我看看到底是怎么回事,很郁闷亚!!~~
{
System.Data.OleDb.OleDbCommand OleSelectDbCommand1;
System.Data.OleDb.OleDbConnection OleDbConnetion1;
System.Data.OleDb.OleDbDataAdapter OleDbDataAdapter1;
System.Data.OleDb.OleDbCommand OleUpdataDbCommand1;
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "欢迎光临" + Request.QueryString["id"];
if (!IsPostBack)
{
data();
}
}
private void data()
{
OleDbConnetion1 = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ; Data Source=G:\denglu\guanli.mdb");
OleDbConnetion1.Open();
OleSelectDbCommand1 = new System.Data.OleDb.OleDbCommand("select * from kucunbiao ", OleDbConnetion1);
OleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
OleDbDataAdapter1.SelectCommand = OleSelectDbCommand1;
DataSet ds = new DataSet();
OleDbDataAdapter1.Fill(ds);
OleDbDataAdapter1.SelectCommand.ExecuteReader();
GridView1.DataSource = ds ;
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write("<script language='javascript'>alert('请先取消')</script>");
}
这是代码 我是菜鸟,写的不好,大家别笑话
帮我看看到底是怎么回事,很郁闷亚!!~~
#12
你得重新 梆定 一下 我也遇到這樣得問題了
#13
if (GridView1.EditIndex == -1)
editIndex=-1是取消编辑状态啊
你把这个方法改下看看
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write(" <script language='javascript'>alert('请先取消') </script>");
}
改成:
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}
我一直是这样写的没有出现过你这样的事情啊.
在不行你就跟踪调式下.
看看那里错了
editIndex=-1是取消编辑状态啊
你把这个方法改下看看
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
if (GridView1.EditIndex == -1)
{
GridView1.EditIndex = e.NewEditIndex;
}
else
Response.Write(" <script language='javascript'>alert('请先取消') </script>");
}
改成:
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}
我一直是这样写的没有出现过你这样的事情啊.
在不行你就跟踪调式下.
看看那里错了
#14
你们说的方法我都试过了,也跟踪过了 就是不知道错在那里
高人们 帮帮忙呀 !!!~~~~
高人们 帮帮忙呀 !!!~~~~
#15
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
//重新绑定数据,必须重新绑
Bind();
}
我也遇见了,重新绑定数据就没事了,一次点击就成功了
{
GridView1.EditIndex = e.NewEditIndex;
//重新绑定数据,必须重新绑
Bind();
}
我也遇见了,重新绑定数据就没事了,一次点击就成功了
#16
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind(); //不知道你们是怎么做的,我加了这一行后表格就没有了
}
但如果只要前面的那一行,我也和楼主一样要点两次才会出来,取消按钮根本就没鸟用,它相当于javascript的history.back();一直跳来跳去。真搞不懂MS是如何定义这个控件的事件的,以前的DataGrid控件就可以直觉使用,
private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//使當前行處於編輯狀態
this.DataGrid1.EditItemIndex = e.Item.ItemIndex;
//需要再次綁定數據
this.BindData();
}
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind(); //不知道你们是怎么做的,我加了这一行后表格就没有了
}
但如果只要前面的那一行,我也和楼主一样要点两次才会出来,取消按钮根本就没鸟用,它相当于javascript的history.back();一直跳来跳去。真搞不懂MS是如何定义这个控件的事件的,以前的DataGrid控件就可以直觉使用,
private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//使當前行處於編輯狀態
this.DataGrid1.EditItemIndex = e.Item.ItemIndex;
//需要再次綁定數據
this.BindData();
}