开发者

div inside a gridview itemtemplate

How do I create and control the content of a div inside a cell of开发者_如何学Python an itemtemplate in a gridview?

Thanks.


Give your div and id and runat="server" then use the rowdatabound event

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx

You'll then need to find your div within each row based on the id and make whatever changes you need

Oh and don't forget to use this within your rowdatabound event or you'll grab headers, footers, etc and not be able to find your control in there

if(e.Row.RowType == DataControlRowType.DataRow)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜