I need to perform an action when user specifically clicks a row with mouse.
AfterSelectChange event fires even when user selects the row using arrow keys. Also, it won't fire twice if I click the same row twice. Not desirable.
MouseClick event fires even when user clicks outside of the rows (group by area, headers, scrollbar, etc). So, this won't do either.
ClickCell event won't fire because CellClickAction = RowSelect.
Is there any property or arguments in some event that will do the job.
You will find the answer in this article from our on-line documentation:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/WinGrid_Determining_Which_Row_the_User_Clicked.html
Handle the MouseUp event of the WinGrid and put in something like this:
UIElement aUIElement = this.ultraGrid1.DisplayLayout.UIElement.ElementFromPoint(new Point(e.X,e.Y));
this
new
// Declare and retrieve a reference to the row
UltraGridRow aRow = (UltraGridRow)aUIElement.GetContext(typeof(UltraGridRow));
typeof
// If a row was found display the band and row index
if(aRow != null)
if
null
this.ultraTextEditor1.Text += "Band(" + aRow.Band.Index.ToString() + ") Row.Index=" + aRow.Index.ToString() + "\n";
else
this.ultraTextEditor1.Text += "* no row associated with this location *\n";
Let use know if you have further questions.