Hello, All.
1. UltraGrid Row, MouseClick . Call Event AfterRowActivate Event
2. But, This Select Row , more MouseClick, not Call AfterRowActivateEvent
(Select / Unselect)
How to Single RowClick Event?
or UltraGrid Click Event Action Only Row? (Click Event is Call GridEmpty Panel , Grid Header )
Help me
Hello isutori,
If I understood you right, I believe that you could use the 'ClickCell' event of the 'UltraGrid' control. Something like the following code sample:
private void ultraGrid1_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e) { //e.Cell.Row }
private void ultraGrid1_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e)
{
//e.Cell.Row
}
The above will fire everytime you click on a cell(this guarantees that you have clicked on a row too) and you could get all the information about the row and the cell you have clicked on.
Please feel free to let me know if I misunderstood you or if you have any other questions.
I have one doubt here.
CLick cell event will eventually be reaised for left as well as for Right click also which hinders the the logic for our right click option.
Can u please tell us how to get the single row click event ?
Hi,
Use the MouseUp event.
HOWTO:UltraWinGrid Mouse Position and Row Identification
Please correct me if i am wrong, Mouse up event will all be fired for right click option ?
If thats the case, than will it hinder the logic for context menu opening ?
Also does it affect our double click event of the grid ?
Hello ,
MouseUp event will occurs every time when mouse button was released, even if it is a click or double click, in this even you will not be able determine if the user wants to double click or single click the component. MouseClick event occurs when mouse was clicked, but you cannot double click without single click. So you should postponed the click event to occur only if double click event doesn’t occur. You could use BackGroundWorker in order “cancel mouse click ” if double click occur, please see attached sample, so on single click with left mouse button PopUp is shown, single click with right button displays context menu, double click with left button opens new form. I hope that this will helps you.
Thank you for using Infragistics Components.
Little correction,
At the same time it should not disturb the current working of context menu opening and double click feature.
When we implemented Mouse_Up event,
Problem which we are facing are:
1) Right click for Context menu open is not working, instead the function written inside Mouse_Up event is getting called twice.
We just want one event which will suffice our need to do some specific operation related to selected row in the click without hindering existing event like context menu opening etc..
My requirement is as below:
we have one grid showing multiple records.
Grid will always have context menu option.
our need is to show one pop up whenever user click on the row depending upon the condition of some respective row column value.
also we do have Double Click event of the grid implemented doing some thing when user double click on the row.
Just need on event for single click on the row that too also mouse left click, so that moment user click on the row our popup should be shown.
At the same time it should disturb the current working of context menu opening and double click feature.
Your assistance on the same would be much appreciated.
Thanks for the clarification.
What we were trying initially , on some some value of the column, we were shownig up pop up.
Now we know what event we have to use (Mouse_Up), is it going to effect our Grid Double Click event on the row as we are not showing up any dialog but we are navigating to different screen because as per my understanding Mouse Up event will be raised in that case also ?
The MouseUp event tells you which button was clicked.
And what do you mean by "affect our double clck event"? I suppose that depends on what you do inside the event. If you show another dialog, then of course it will prevent a double-click. But that will happen no matter what event you use.