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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Mouse Cell Selection (works 1st time, doesn't afterward)

Thread ID:

Created:

Updated:

Platform:

Replies:

1076 Sep 19,2002 06:12 PM UTC Sep 20,2002 02:24 PM UTC WinForms 3
loading
Tags: GridControl
Rollan Mosko
Asked On September 19, 2002 06:12 PM UTC

I have a tab control containing a grid in a modeless form. What I find is I can select a cell in my grid with the mouse one time only. I can't select any other cells afterward and need to rely on the keyboard controls for navigation. Once I leave this tab and renter the tab again then I can select a cell one more time. I'm using mostly default settings for the grid, so I'm perplexed about this behavior. I can add the grid to a model dialog and see that multiple mouse selects work fine. Is there something weird about modeless dialogs? Attached is a snippet of my InitializeComponent() method that should show the default grid settings. The grid in question is called 'grdChromProperties' thanks, Rollan

Clay Burch [Syncfusion]
Replied On September 20, 2002 06:12 AM UTC

With version 1.0.2.4, I created a form with a button on it. Then in the button handler, I created a second form and used ShowDialog to display this second form. On the second form I had a tabcontrol with 3 tabpages. On the first page, I put two panels docked left and fill with a splitter between them. In the fill panel I added a GridControl using exactly the code in your attached vb file. With this setup, I was able to click several cells, select several ranges of cells, change tabs and then return to the first tab, and was able to still click on cells. Are you using version 1.0.2.4? Earlier releases had a focus problem when the grid was parented in panels inside other controls. What is different about what you are doing than what I described above?

Rollan Mosko
Replied On September 20, 2002 11:55 AM UTC

Hi Clay, I'm using version 1.0.2.4 as well. I found out what's aggravating the grid. We have a user-control that bothers it. This user control is owner-drawn using an OnPaint() override. Another developer created this control and isn't with us anymore so I don't know a lot about the guts of it (yet). Once I blank out the panel containing this control things are groovy. Are there some suggestions you can give me for what to look for to make the user control play well with the grid? thanks, Rollan

Clay Burch [Syncfusion]
Replied On September 20, 2002 02:24 PM UTC

Rollan, So the user control is in a completely different sibling panel than the panel holding the grid? One thing you might want to do is to make sure you call CurrentCell.EndEdit to close any open edits as you leave the grid. You could use code such as: Private Sub GridDataBoundGrid1_CurrentCellDeactivating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles GridDataBoundGrid1.CurrentCellDeactivating If Not Me.GridDataBoundGrid1.CurrentCell.IsInMoveTo And Me.GridDataBoundGrid1.CurrentCell.IsEditing Then Me.GridDataBoundGrid1.CurrentCell.EndEdit() Console.WriteLine("EndEdit") End If End Sub in the CurrentCellDeactivating event to do this. Other than that, I cannot think of anything. -Clay

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.

Warning Icon 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.Close Icon

;