Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
224
How to make the UltraListViewItem Selected at run time
posted

when i am right click over an UltraListView Item, i need to get that item selected.

i ve got the item through MouseDown Event by ItemFromPoint(e.x,e.y)

But there is no Property called "Selected" to true.

ulvMethodsList.Items[2].-----???

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

private 

 

void ulvWebMethods_MouseDown(object sender, MouseEventArgs e)

{

 

 

if (e.Button == MouseButtons.Right)

{

 

 

Point cursorPos = new Point(e.X, e.Y);

 

 

UltraListView listView = sender as UltraListView;

 

 

 

 

UltraListViewItem itemAtPoint = listView.ItemFromPoint(cursorPos, true);

 

 

 

 

if (itemAtPoint != null)

 

 

this.ulvMethodsList.ContextMenuStrip = null;

 

 

else

 

 

this.ulvMethodsList.ContextMenuStrip = cmsListViewStyle;

}

Kindly reply if u ve any solutionto select the item by default while i right click over the ListView in Infragistics.