本文介绍了为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更改
发布评论