This is a migrated thread and some comments may be shown as answers.

select an radlistbox item by right click the mouse

1 Answer 145 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mohan
Top achievements
Rank 1
Mohan asked on 11 Feb 2013, 10:05 AM
Hi ,
          I am using rad listbox for display the data and having context menu by right click the listbox.
I am having problem in selected item by right click(not selected if any other item by right clicking).
please give solution for this.

1 Answer, 1 is accepted

Sort by
0
Mohan
Top achievements
Rank 1
answered on 11 Feb 2013, 10:59 AM
private void radListBox1_MouseDown(object sender, MouseEventArgs e)
      {
          if (e.Button == MouseButtons.Right)
          {
              RadElement clickedItem = radListControl2.ElementTree.GetElementAtPoint(e.Location) as RadElement;
              if (clickedItem != null)
              {
                  RadListBoxItem dataItem = clickedItem as RadListBoxItem;
                  MessageBox.Show("Right Clicked " + dataItem.Text);
              }
          }
      }

Tags
General Discussions
Asked by
Mohan
Top achievements
Rank 1
Answers by
Mohan
Top achievements
Rank 1
Share this question
or