如何在gridview控件中访问列表框selecteditem值 [英] How to access the listbox selecteditem value inside the gridview control

查看:77
本文介绍了如何在gridview控件中访问列表框selecteditem值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在RowDatabound事件中加载了Listbox控件,并且我的列表框现在放置在gridview内,我想要在lstbox中尝试的gridview中的列表框的selecteditem值selectedindexchanged改变了,但它不起作用了!!!!

i Have Loaded my Listbox control in RowDatabound event and my listbox is placed inside the gridview now i want the selecteditem value of the list box in the gridview i tried in lstbox selectedindexchanged but it is not working give any idea !!!

推荐答案

SelectedIndexChanged应该触发回发,这就是您想要的吗?您可以处理在javascript中更改的所选索引,并使用AJAX将值发送到服务器.您也可以在回发时从gridview中获取控件,并以此方式获取其值.您什么时候想要值?您在用它做什么?
SelectedIndexChanged should fire a postback, is that what you want ? You can handle the selected index changed in javascript and use AJAX to send values to the server. You can also just get the control from the gridview on postback, and get it''s value that way. When do you want the value ? What are you doing with it ?


这篇关于如何在gridview控件中访问列表框selecteditem值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆