Skip to content

Instantly share code, notes, and snippets.

@mbcrump
Last active August 29, 2015 14:00
Show Gist options
  • Save mbcrump/11184687 to your computer and use it in GitHub Desktop.
Save mbcrump/11184687 to your computer and use it in GitHub Desktop.
RadListDataItem Double Click Event
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