网格视图在行中编辑和更新
问题描述:
我有一个开发快速网格视图,我想在其中编辑行。当我单击编辑选项时,它会显示更新和取消带有文本框的按钮。但我无法更新我在文本框中给出的值。如何更新它PLZ帮助我。
自动生成列在我的情况下是假的。
i have a dev express grid view in which i want to edit the row. when i click the edit option it shows update and cancel buttons with text boxes. But i am not able to update the value which i am giving in the text box. how to update it plz help me .
auto generate columns is false in my case.
答
在更新事件中;更新该特定列的数据集
protected void update(object sender,EventArgs e)
{
dr [Firstname] = txtFirstname.Text;
}
确保您的数据流是当前编辑点击
Datarow dr = dt.Select(EventID = {0},EventID)
In the update event; Update the dataset of that particular column
protected void update(object sender, EventArgs e)
{
dr["Firstname"] = txtFirstname.Text;
}
Make sure your datarow is current edit click
Datarow dr = dt.Select("EventID= {0}",EventID)
你可以显示你的代码吗?
参考这个链接,它可以帮到你。
http://demos.devexpress.com/ASPxGridViewDemos/GridEditing/EditForm.aspx [ ^ ]
can u show ur code?
refer this link, it may helps you.
http://demos.devexpress.com/ASPxGridViewDemos/GridEditing/EditForm.aspx[^]