Last active
August 29, 2015 14:00
-
-
Save mbcrump/11184687 to your computer and use it in GitHub Desktop.
RadListDataItem Double Click Event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Windows.Forms; | |
using Telerik.WinControls.UI; | |
namespace TelerikListWinForms | |
{ | |
public partial class Form1 : Form | |
{ | |
//Make sure you tie the radListControl to the MouseDoubleClick event handler either through the control itself or code behind. | |
public Form1() | |
{ | |
InitializeComponent(); | |
this.radListControl1.MouseDoubleClick += radListControl1_MouseDoubleClick; | |
} | |
private void radListControl1_MouseDoubleClick(object sender, MouseEventArgs e) | |
{ | |
RadListVisualItem clickedItem = radListControl1.ElementTree.GetElementAtPoint(e.Location) as RadListVisualItem; | |
if (clickedItem != null) | |
{ | |
RadListDataItem dataItem = clickedItem.Data; | |
MessageBox.Show(dataItem.Text); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment