提问人:Tharney 提问时间:7/3/2022 最后编辑:Tharney 更新时间:7/3/2022 访问量:114
ComboBox 事件适用于 ListBox,但不适用于 GridView
ComboBox Event works with ListBox but not with GridView
问:
The function should be simple:
I select an item, which is added to a list, then i manage that item using the list.
As first try i put some buttons next to the listbox and it worked fine.
But the objective is to add two buttons in each row, so i replaced the listbox with a gridview.
What's the problem? The event SelectedIndexChanged of the ComboBox (which is used to add the item to the list) does trigger once but not the second time.
The page correctly goes through page load, but the combobox's event is ignored.
代码在这里: https://pastebin.com/Bmg2qjTf
I think i must say the combobox is filled using an SQL: the first time the SQL Query is executed and applied to the ComboBox's DataSource and in a Session, on PostBacks instead it gets refilled thru the Session variable.
答:
0赞
Tharney
7/3/2022
#1
解决方案:添加 txtNumSpedizione.Text = “”;
故障 排除: 我试图使两者(列表框和网格视图)同时工作,这样它就可以工作了,网格视图也得到了所有选择。 所以我弄清楚了之前和之后之间的区别在文本字段“重置”中。
评论