如何将Gridview Dynamic BoundFileld更改为Linkbutton [英] How to change Gridview Dynamic BoundFileld to Linkbutton
本文介绍了如何将Gridview Dynamic BoundFileld更改为Linkbutton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的先生/女士,
我有一个Gridview。这是充满动态列。我想只设置第一列linkbutton。如何更改linkbutton以及如何获取linkbutton click事件
解决方案
阅读: Add-Dynamically-Controls [ ^ ]
在代码中动态创建GridView
列时,包括另一列,这是一个LinkButton
。
将其CommandEvent
定义为......
LinkButtonID.Command + = new CommandEventHandler(LinkButton_Command);
protected void LinkButton_Command( object sender,CommandEventArgs e)
{
// 做点什么。
}
Dear Sir/Madam,
i Have one Gridview. that is full of dynamically column. i want set first column only linkbutton. how to change linkbutton and how to get linkbutton click event
解决方案
Read this: Add-Dynamically-Controls[^]
While creating theGridView
columns Dynamically in code, include another column, which is aLinkButton
.
Define itsCommandEvent
as...
LinkButtonID.Command+= new CommandEventHandler(LinkButton_Command);
protected void LinkButton_Command(object sender, CommandEventArgs e) { // Do something. }
这篇关于如何将Gridview Dynamic BoundFileld更改为Linkbutton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文