delPiero
2014-04-11T01:13:29Z
hello,
I have a Context menu so when I want to use it I right click on the row.
with iGrid i have to left click to select row then right click, any way possible to just one right click ?
Igor/10Tec
2014-04-11T06:42:58Z
People not always need to select the cell under the mouse pointer automatically when the right mouse button is pressed. That's why we didn't implement it as the default behavior.

However, all is possible with the iGrid members. To implement what you need, you can simply select the cell under the mouse pointer in the CellMouseDown event. Here is the corresponding code snippet from the 'Cell Popup Menu' sample from the extra samples library :

Private Sub fGrid_CellMouseDown(ByVal sender As Object, ByVal e As TenTec.Windows.iGridLib.iGCellMouseDownEventArgs) Handles fGrid.CellMouseDown

	If e.Button = MouseButtons.Right Then

		fGrid.SetCurCell(e.RowIndex, e.ColIndex)
		e.DoDefault = False

	End If

End Sub
delPiero
2014-04-11T06:48:08Z
it did not work.. it didnt select the row..
2014-07-14T08:05:48Z
I have the same issue - if you right click on one cell it picks up the coordinates correctly but if you then right-click on another cell (without selecting a context menu item first) then it does not pick up the new coordinates.

I have tried adding a handler to the Cell's Mouse Enter event to work around this, but this doesn't work as it seems while the context menu is displayed the mouse events do not fire.

So this means if a user first right-clicks on one cell and then right-clicks on another and you "do something" on the context menu you will not be operating on the user's selection, but on their previous right-click selection.
Igor/10Tec
2014-07-14T15:08:59Z
I have experimented a little bit. It seems, this code works ok for earlier versions of iGrid (the extra sample was based on the iGrid.NET v1.6), but something changed in the latest versions (checked with the latest v4.6). Give me a couple of days, and I'll try to find a workaround.
Igor/10Tec
2014-07-21T14:53:01Z
Guys, I have found the source of this issue. It was really a subtle change in the iGrid internals in one of the recent versions.

I'm ready to provide a fix for testing. Contact me please using our email support address.
2014-07-23T12:24:19Z
Thanks Igor, I've sent you an email at your support address.
2014-08-01T08:30:20Z
Continuing testing this and everything has been going fine.

However I have now hit an issue getting the updated version working when getting a fresh copy of the solution from TFS from scratch.

Here's what I did:

Installed iGrid 4.6 retail locally (C:\10Tec\iGrid.NET 4.6 - default)
Created a new workspace and grabbed a copy of the solution
Solution builds fine, runs fine, and I can open forms and designer works fine.

I then dropped in the updated 4.6.5 version of TenTec.Windows.iGridLib.iGrid.v4.6dll into the Bin directory of the above, closing VS first and then reopening.

The project still builds fine and runs fine, but now when I open a form with an iGrid I get error messages, eg

Could not find type 'TenTec.Windows.iGridLib.iGrid'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

Could not find type 'TenTec.Windows.iGridLib.iGCellStyle'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

I have tried removing the references to the iGrid DLL, running a Clean, adding back the references and doing a full build but I am still getting these errors.

I managed to get this running fine previously with the updated 4.6.5 version (and the existing Designer dll from 4.6) but I am not sure how!

http://10tec.com/forum/p...hout-installing-the-demo  and these are present and correct, and I have also tried dropping the designer DLL into C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies as per that post, but still failing to get this working.

Any tips?

Thanks
Igor/10Tec
2014-08-01T13:14:57Z
When I tested the fixed build of iGrid, I did the same. I replaced the official retail build with the new one, rebuilt the project - and all worked ok. I do not know what can be wrong, especially taking into account the fact that earlier you could use the updated build.

Errors like "Could not find type 'TenTec.Windows.iGridLib.iGCellStyle'. Please make sure that the assembly that contains this type is referenced." tell us that the compiler cannot find the core iGrid.NET DLL library, not the design-time part. I could suspect that something went wrong when you tried to place the iGrid.NET DLL into different folders.

If you don't mind, let's continue this discussion in email as the subject of this forum thread is "select a row with a right click".