如何在按钮点击事件中触发组合框选择的索引更改? [英] How to trigger combobox selected index changed in button click event?

查看:86
本文介绍了如何在按钮点击事件中触发组合框选择的索引更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户选择combox项目时它会处理以下事件



when user select combox item it handles follwing event

combobox_selectedindexchanged()





当用户点击按钮我想再次触发上面的事件时自动就像用户选择的项目



我的意思是我想要当用户点击按钮时,以编程方式处理事件,组合框内的代码应该是合理的;



我尝试过:



i尝试过page.refresh(),直接调用事件但没有发生任何事情。



when user click on button i want to trigger above event again automatic like user selected the item

My mean is i want to handle the event programmatically when user click on button, the code inside combobox event should be exceuted;

What I have tried:

i have tried page.refresh(),call directly event but nothing happened.

推荐答案

不要。

相反,让两个事件都调用相同的函数并在那里进行处理。
Don't.
Instead, have both events call the same function and do the processing there.


这篇关于如何在按钮点击事件中触发组合框选择的索引更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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