澄清事件 [英] Clarification of events

查看:105
本文介绍了澄清事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,我们必须使用selected index changingselected index changed event.

谁能澄清我的疑问.

In which situation we have to use selected index changing, selected index changed event.

Can anyone clarify my doubt.

推荐答案



只需以GridView为例并尝试理解以下内容:
当单击一行的选择"按钮时,但在GridView控件处理选择操作之前,将引发SelectedIndexChanging 事件.这样,您就可以提供一个事件处理方法,该方法将在发生此事件时执行自定义例程,例如取消选择操作.

当单击一行的选择"按钮时,但在GridView控件处理选择操作之后,将引发SelectedIndexChanged 事件.这样,您便可以提供一种事件处理方法,该方法可以在发生此事件时执行自定义例程,例如使用当前选定的行更新状态标签.



--Amit
Hi,

Just take the example of GridView and try to understand this:
The SelectedIndexChanging event is raised when a row''s Select button is clicked, but before the GridView control handles the select operation. This allows you to provide an event-handling method that performs a custom routine, such as canceling the selection operation, whenever this event occurs.

The SelectedIndexChanged event is raised when a row''s Select button is clicked, but after the GridView control handles the select operation. This enables you to provide an event-handling method that performs a custom routine, such as updating a status label with the currently selected row, whenever this event occurs.



--Amit


您将在此页面上获取所有信息
You will get all info on this page
Google


这篇关于澄清事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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