Hi,
I do not know where to post this, either in win grid or the tool bars option.
Anyway, I have a grid that has 5 rows. If i select(left click) the second row, the active row would be "1" - which is right. but with the implementation of a popupmenutoolbar, if i right click on the 5th row, the fifth row gets highlighted but the active row is still 1. So I wanna know if it's possible to get the index of the highlighted row instead of the active row.
The ActiveRow in the grid does not change on a right-click of a cell, nor does it get selected. The ActiveRow will change if you right-click on the RowSelector, though.
So if the row is getting highlighted when you right-click on it, something in your code must already be identifying this row and selecting it. So the same code probably just needs to be updated to make the row active as well as selected.
My first choice to do something like this would be in the MouseDown event of the grid, so that's the first place I would look.
Also, this article might help:
HOWTO:UltraWinGrid Mouse Position and Row Identification
Sorry Mike, just to clarify have you tried to use the ultratoolbarsmanager popup toolbar option? Because without it you are absolutely correct.
I am also inquiring about this issue with the navigation side of infragistics because they developed the ultratoolbarmanager popupmenu.
P.S. if you need help in producing a popupmenu, i would definitely be available.
Lastly, you didn't answer the question: is it possible just to get the highlighted row instead of the active row? -- I'm assuming not.
demigod1 said:Lastly, you didn't answer the question: is it possible just to get the highlighted row instead of the active row? -- I'm assuming not.
Oops, sorry, almost missed it again. :)
Yes, you can use grid.Rows.Selected to get the collection of selected rows. But you really should not have to. In fact, I don't see how that will help you, since the rows are getting de-selected, anyway.
Hi Mike,
Thank you so much! @.@ I'm stupid, I didn't thin of that... Agora was a contracting company we used prior to deciding to inhouse develop the code. = / My fault...
Regards,
Aaron
I can't run your sample. It's relying on your own Agora.Framework.Win.UI.InfragisticsHelpersm which is relying on an old version of the Infragistics assemblies which I don't have, so it won't run.
I'd be interesting in seeing the source code for the InfragisticsHelper.UltraGridShowPopupOnMouseUp method. Something in there must be changing the grid's selection.
http://www.mediafire.com/?uummyovtwwz
I've uploaded the file in the above link. I am somewhat working around it by reselecting all the cells that was deselected by the popup of the menubar. The only thing I need to do would be to hide the highlighting of the pop-up menu.
And yea, thanks for the grid.rows.selected, but I no longer need it as I started reselecting all the cells instead of activating the row where the menu bar pop-uped.