c# - 如何在 gridview editItemTemplate 内的列表框中选择多个值?

标签 c# asp.net data-binding gridview

如果我有一个下拉列表,我知道我可以......

SelectedValue='<%#Bind("AgencyID")%>' 

我想对列表框执行相同的操作,但要选择多个值。我试图使用 gridview.FindControl("listbox") 但它始终为空。有人可以指导我正确的方向吗?谢谢!

编辑:

我不确定我是否应该编辑别人的问题。但我有同样的问题,需要尽快找到好的解决方案。我已经花了 2 天时间寻找相同的好的解决方案。

Please see my question

我已经浏览了以下一些链接,但没有得到太多帮助,并且仍在尝试获得解决方案。

我经历过的链接 http://www.gutgames.com/post/Using-a-ListBox-Using-SelectionMode-Multiple-with-a-GridView.aspx

http://forums.asp.net/t/1003876.aspx/1

最佳答案

问题已解决...我只是在列表框进行数据绑定(bind)时设置了选定的值。

关于c# - 如何在 gridview editItemTemplate 内的列表框中选择多个值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1644917/

相关文章:

c# - WPF,如何在选择后重置组合框

c# - react 性扩展 : Getting the "aperture" of a binary number

asp.net - 使用 RestSharp/JSON.NET 反序列化自定义数组

asp.net - 使用 GetDirectories 时的性能变化

c# - 如何从操作中提交带有隐藏字段的表单?

android - Fragment Android Kotlin 中的 DataBinding+ViewModel

c# - 如何使用 P/Invoke 将 unsigned long 传递给 Linux 共享库

c# - 将 ActionFilterAttribute 应用于整个 WebAPI?

.net - INotifyPropertyChanging 和验证 : when do I raise PropertyChanging?

c# - Winforms 组合框数据绑定(bind)整个对象(无数据成员)