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.

Not getting selection

Thread ID:

Created:

Updated:

Platform:

Replies:

20632 Oct 21,2004 02:46 PM Oct 22,2004 02:39 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 21, 2004 02:46 PM

In our grid, we have a hierarchical layout. We''ve modified selection so that when the parent row of a hierarchy is selected, so are its children. We''ve also modified it so that selecting a cell, selects the entire row (and if that row is a parent, its children as well) Whena child row is selected, only the child row should be selected. Where I have a problem is in the following situation: If I click on the parent row header, the parent and all children are selected. If I then click on one of the child rows'' row headers, I don''t get the SelectionChanging event. If I click on a cell other than the row header in that row, then I get the SelectionChanging event and everything works fine. Any idea why clicking on the child row''s row header isn''t working? Pete

Administrator [Syncfusion]
Replied On October 21, 2004 03:19 PM

Is this a hierarchical GridDataBoundGrid or something else? About the only reason I can think of that would cause the click to be ignored is if the cell has style.Enabled = false for the header cell. One thing you might try is to use a debug build of our libraries, and put a stop in the grid''s OnMouseDown or OnGridControlMouseDown, and try to catch the mousedown in the problem situation. Then you might be able to step through the code to see why the OnSelectionsChanging is not being hit. If you can post a sample project showing the problem, we can try to spot something here.

Administrator [Syncfusion]
Replied On October 21, 2004 07:29 PM

Okay, after tracing through it, I discovered the cause of the problem. So here it is, and I still need a solution. The renderer for my row headers handles OnHitTest. In the OnHitTest, I set the cursor to a regular arrow cursor and return 1. My requirements specify that in this grid, it must use a regular arrow. This was the only way I could find to do it. And by doing this, for some reason, it doesn''t send the selectionchanging even when the cell (In this case, a row header) is in the current selection. Setting the cursor to the regular arrow and returning 0 causes the arrow cursor to flicker for a second, but otherwise sticks to the old right arrow cursor. So, if you can provide me with a different way of changing the cursor to a regular arrow over my header cell, even though the cell is selectable, without returning a 1 in OnHitTest, then you will have solved my problem. Thanks. Pete

Administrator [Syncfusion]
Replied On October 22, 2004 02:39 AM

Another way to display a special cursor is to derive the grid and overriding OnSetCursor. Here is a sample. You would add some checks to only make the change over the headers.

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.

;