本文介绍了如何在行点击时触发事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, 我用数据集填充了我的报告,现在我想在点击其中一个显示的行时触发一个事件,但我不知道该怎么办。 任何人都知道这个解决方案吗?Hi all,I populated my report with a Dataset, now I'd like to fire an event when I click on one of the displayed rows, but I don't know what to do.Anyone knows a solution for this?推荐答案我知道这是一个老帖子,但我想我可以碰这个帖子而不是制作一个全新的,因为我有基本相同的问题。 我试图在用户点击报告中的一行时触发一个事件。我正在使用VS2008附带的CR版本。 我们有一些使用对象axCrystalActiveXReportViewer的旧代码,它完全符合我的要求,如下所示:I know this is an old post, but I figure I can bump this post instead of making a whole new one as I have essentially the same problem.I'm trying to fire an event when the user clicks a row in the report. I'm using the version of CR that ships with VS2008.We have some old code which uses an object axCrystalActiveXReportViewer which does exactly what I want, which looks like this: private void axCrystalActiveXReportViewer1_Clicked(object sender, axCrystalActiveXReportViewerLib102._ICRViewerEvents_Clic kedEvent e) { CRVEventInfo eventInfo =(CRVEventInfo)e。 eventInfo; long lIndex = eventInfo 。指数; long lParentIndex = eventInfo .ParentIndex; CRObjectType crot = eventInfo 。类型; string text = eventInfo 。文字; ICRFields fields =(ICRFields)eventInfo.GetFields(); < snip>private void axCrystalActiveXReportViewer1_Clicked(object sender, axCrystalActiveXReportViewerLib102._ICRViewerEvents_ClickedEvent e) { CRVEventInfo eventInfo = (CRVEventInfo)e.eventInfo; long lIndex = eventInfo.Index; long lParentIndex = eventInfo.ParentIndex; CRObjectType crot = eventInfo.Type; string text = eventInfo.Text; ICRFields fields = (ICRFields)eventInfo.GetFields(); <snip> 这篇关于如何在行点击时触发事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-12 23:45