如何为GridView添加事件处理程序

如何为GridView添加事件处理程序

本文介绍了如何为GridView添加事件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想为gridview中的多个列添加单个事件处理程序.我如何添加它可以帮助我解决此问题.


在此先感谢

Hi,

I want to add the single eventhandler for the multiple columns in gridview. How can I add this can any one help me to solve this issue.


Thanks in advance

推荐答案

For i as Integer = 0 to Gridview1.Columns.Count - 1
  AddHandler Gridview1.Columns(i).PropertyChanged, AddressOf Column_PropertyChanged(sender as Object,e as PropertyChangedEventArgs)
Next



您需要定义一个通用处理程序



You need to define a common handler

Public Sub Column_PropertyChanged(sender as Object,e as PropertyChangedEventArgs) 


这篇关于如何为GridView添加事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 01:23