为Dynamic Gridview C#选择的iNdex更改

编程入门 行业动态 更新时间:2024-10-19 02:15:09
本文介绍了为Dynamic Gridview C#选择的iNdex更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个动态创建的GridView。现在我想向它添加'selectedIndexChanged'事件。由于行也是动态的,我无法做到这一点。请帮助我找到合适的解决方案。 谢谢...

Hi, I have a GridView that is created dynamically. Now I want to add 'selectedIndexChanged' event to it. As the rows are also dynamic, I am unable to do this. Kindly help me with suitable solution. Thanks...

推荐答案

GridView NewDg = new GridView( ); GridView NewDg = new GridView(); NewDg.ID = "SubGridView" + e.Row.RowIndex.ToString(); NewDg.DataKeyNames = new string[]{"logentry_id"}; NewDg.SelectedIndexChanged += new EventHandler(NewDg_SelectedIndexChanged); NewDg.RowDataBound += new GridViewRowEventHandler(NewDg_RowDataBound);

希望这个会帮助你并提高率我的ans

hope this one will help u and improve rate my ans

只需到设计页面点击网格视图然后右键点击网格视图和打开属性 然后去参加活动和加倍点击已更改的所选索引将被创建 JUST GO TO DESIGN PAGE CLICK ON GRID VIEW AND THEN RIGHT CLICK ON GRID VIEW AND OPEN properties and then go to event and double click on selected index changed it will be created

更多推荐

为Dynamic Gridview C#选择的iNdex更改

本文发布于:2023-11-11 23:11:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579805.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Dynamic   Gridview   iNdex

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!