We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

CellCommentTips in Virtual Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

11278 Mar 1,2004 02:30 PM Feb 9,2005 06:44 PM Windows Forms 8
loading
Tags: GridControl
Dan Woodard
Asked On March 1, 2004 02:30 PM

Using the CellCommentTips example, I am trying to create my own MouseController. However I am attaching this controller to a virtual grid. Everything works well, with one exception. The controller I implemented pops up a supporting window (Just like the CellCommentTips example.), within MouseHover. The problem appears to be that GridQueryInfo is being called as the new window appears, which causes MouseLeave to be fired, but my mouse hasn''t left so MouseHover gets called.... Needless to say, I get a flashing window. I thought perhaps I was missing something from the example so I wired up the example to a virtual grid and got the same behavior. Do you have any suggestions for mitigating this behavior? thanks! -dan

Administrator [Syncfusion]
Replied On March 1, 2004 03:23 PM

Are you saving the tip in SaveCellInfo, and retrieving it in QueryCcellInfo? Here is a sample that does tips for a GridDataBoundGrid. A GridDataBoundGrid is a type of virtual grid. This sample saves the Excel Tips in a hashtable in SaveCellInfo, and retrieves them from the hashtable in QueryCellInfo. It does not seem to have a flashing problem. ExcelCommentGDBG_2238.zip

Dongxian Li
Replied On November 22, 2004 01:56 PM

Hi Clay, I used the cellCommentTips in my virtual grid. It works fine when the scrollbar is at the leftmost position. But there is a problem when the scrollbar is moved and is not at the beginning position. The comment window becomes invisible or not at the side of the right click cell even if it is visible. How should I fix the problem? Thanks Dongxian

Administrator [Syncfusion]
Replied On November 22, 2004 05:23 PM

The positioning/size calculations are done in GridCellComment.InitializeComment. At the bottom of that method, you can test to see if the panel will be off the display, and if so then move it. Here is the sample modified to do this. The changes included adding the grid to the call list for the InitializeComment method so you could use its clientwidth. Also, a property was added to indicate whether the panel was moved so the mouse controller knows not to draw the little arrow. I am not sure what you want to do about drawing the arrow. I just did not draw it in this case. You could draw it in some other position if you want.

Dongxian Li
Replied On November 29, 2004 01:58 PM

Hi Clay, Thanks for the reply. Your sample solved part of the problem. It works when the virtual grid does not have frozen rows and frozen cols. It does not work when the virtual grid control has frozen rows and frozen cols. The cell comment viewing window flashes and the cell comment edit window does not positioned in the right place. But I have figured out a way to fix the problem. I have made changes to the GridCellComment.InitializeComment, CommentMouseController.StartEditing and CommentMouseController.MouseHover to make it work. I have attached the modified zip file for your info. I am using .Net Framework 1.1, so the solutions are 1.1 format. Thanks again for your excellent support. Dongxian CS_CellComment_GridWithFrozenRows_4490.zip

Dongxian Li
Replied On February 9, 2005 05:23 PM

I am using the cell comment in a virtual grid. The cell comment works fine when the virtual grid is not in split mode. But it does not work when the grid is splitted into four. The cell comment only appears on the top-left corner grid, it does not appear on the other grids. Is there a way to make it work on all the grids? Thanks Dongxian

Administrator [Syncfusion]
Replied On February 9, 2005 05:59 PM

Dongxian, make sure you handle then PaneCreated and PaneCloseing event. In PaneCreated you need to instantiate the MouseController for the new pane. In PaneCloseing you need to dispose it. Stefan >I am using the cell comment in a virtual grid. The cell comment works fine when the virtual grid is not in split mode. But it does not work when the grid is splitted into four. The cell comment only appears on the top-left corner grid, it does not appear on the other grids. Is there a way to make it work on all the grids? > >Thanks >Dongxian > >

Dongxian Li
Replied On February 9, 2005 06:40 PM

I tried that and it still does not work. I added following code to PaneCreated and PaneClosing: private void splitterControl1_PaneCreated(object sender, Syncfusion.Windows.Forms.SplitterPaneEventArgs e) { GridControl grid = e.Control as GridControl; ExcelTip.CommentMouseController commentMouseController; commentMouseController = new ExcelTip.CommentMouseController(gridControl1); commentMouseController.ContextMenuEnabled = true; grid.MouseControllerDispatcher.Add(commentMouseController1); } private void splitterControl1_PaneClosing(object sender, Syncfusion.Windows.Forms.SplitterPaneEventArgs e) { GridControl grid = e.Control as GridControl; grid.MouseControllerDispatcher.Dispose(); } Attached is the zipped Form1.cs file that contains the code. Thanks dongxian Form1_3978.zip

Dongxian Li
Replied On February 9, 2005 06:44 PM

Sorry. I made a mistake in the code. I passed the wrong gridControl to mouseController. After I corrected the problem. It works fine. Thanks for the help. I appreciate it. -Dongxian >I tried that and it still does not work. I added following code to PaneCreated and PaneClosing: > >private void splitterControl1_PaneCreated(object sender, > Syncfusion.Windows.Forms.SplitterPaneEventArgs e) >{ > GridControl grid = e.Control as GridControl; > ExcelTip.CommentMouseController commentMouseController; > commentMouseController = new ExcelTip.CommentMouseController(gridControl1); > commentMouseController.ContextMenuEnabled = true; > grid.MouseControllerDispatcher.Add(commentMouseController1); > >} > >private void splitterControl1_PaneClosing(object sender, > Syncfusion.Windows.Forms.SplitterPaneEventArgs e) >{ > GridControl grid = e.Control as GridControl; > grid.MouseControllerDispatcher.Dispose(); > >} > > >Attached is the zipped Form1.cs file that contains the code. > >Thanks >dongxian > > > >Form1_3978.zip > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;