编辑DataGrid项 [英] EDIT the DataGrid Item
本文介绍了编辑DataGrid项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 DataGrid ,其中一个列是Title(LinkButton).当我单击此链接时,我想编辑DataGrid列.我想在该列中显示所有值适当的控件.
例如我使用TextBox.我想将数据显示到我的TextBox中.
为此,我这样写,
Hi ,
I have a DataGrid in that one of the col is Title(LinkButton).I want to EDIT my DataGrid Col''s , when i click on this link .I want to display all the values in the appropriate controls.
for ex i''m using TextBox . I want to display the data into my TextBox.
for that i wrote like this,
<ItemTemplate>
<asp:Label ID="lblClientDwgNo" runat="server"
Text='<%# DataBinder.Eval (Container.DataItem,"Client_Dwg_No") %>'></asp:Label>
</ItemTemplate>
if(e.CommandName=="Edit")
{
if (e.Item.ItemType == ListItemType.Item ||
e.Item.ItemType == ListItemType.AlternatingItem)
{
string Client_Dwg_No =
Convert.ToString( ((Label) e.Item.FindControl ("lblClientDwgNo")).Text);
}
}
但是我无法显示该值到TextBox.如果显示了该值,则我对该值进行编辑.
谁能帮助我做到这一点..
提前感谢
But i''m not able to display the value to TextBox.If the value is display then i EDIT that value.
can anyone help me to do this..
Thanx in advance
推荐答案
可能是此 [
Hi,
May be this [^] can help you.
请详细解释问题,
您想在链接上显示什么控件,并且正在使用gridview或Repeater?
please explain question in details,
what control you want to show on link and you are using gridview or Repeater?
这篇关于编辑DataGrid项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文