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.

Weirdness with checkbox control in virtual data grid

Thread ID:

Created:

Updated:

Platform:

Replies:

18582 Sep 2,2004 04:21 PM Sep 3,2004 10:09 AM Windows Forms 3
loading
Tags: GridControl
Thomas W. Brown
Asked On September 2, 2004 04:21 PM

I have a virtual data grid (I''m not sure if the virtualness makes a difference -- basically it''s not a databound grid) and one of the columns has a checkbox style. If I click the mouse in the cell but not on the actual checkbox control everything is fine -- the check status toggles just fine (as long as I ConfirmChanges() on the current cell). However, if I click on the actual checkbox control then I get strange behavior. Sometimes the right thing happens, but other times the previously active cell gets toggled. I also see the following two messages appear in the console window: catched at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly) in :line 0 catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0 Any suggestions? -- TB

Administrator [Syncfusion]
Replied On September 2, 2004 05:34 PM

Exactly what control are you using, a GridDataBoundGrid or a GridControl? The default checkbox behavior is not to toggle the check box value unless you click on the checkbox itself. You can see this in the Grid\Samples\Quick Start\CellTypes sample that we ship. Are you doing something to try to change the check value if you just click on the cell as opposed to clicking on the checkbox? If so, if you remove this code do things work better?

Thomas W. Brown
Replied On September 3, 2004 09:51 AM

>Exactly what control are you using, a >GridDataBoundGrid or a GridControl? GridControl -- although I am displaying ADO.NET based DataTables, they are quite large and the time it takes to bind to a GridDataBoundGrid is unacceptable so I''m implementing a virtual data grid. > >The default checkbox behavior is not to toggle >the check box value unless you click on the >checkbox itself. You can see this in the >Grid\Samples\Quick Start\CellTypes sample that >we ship. Are you doing something to try to >change the check value if you just click on the >cell as opposed to clicking on the checkbox? If >so, if you remove this code do things work >better? In QueryCellInfo I set the CellType to "CheckBox" for boolean typed fields. If I do nothing else then I never get the checkbox to toggle on a click, no matter what. So I override OnMouseUp and, if the current cell type is "CheckBox" I make sure the cell is active, in edit mode, and I go ahead and toggle the cell. Again, this works well for clicks in the cell but not on the checkbox control itself. So, no, removing the special handling I have to toggle on a cell click does *not* improve things it actually makes things worse. Perhaps I''m missing something here because of the virtual nature of my data grid? Do I have to bind the checkbox control to something? Thanks! -- TB

Administrator [Syncfusion]
Replied On September 3, 2004 10:09 AM

Here is a little sample that virtually binds a DataTable with a checkbox column to a GridControl. The main things is to make sure the CheckBoxOptions get set to match what is in your datatable. Otherwise, the cell does not know how to display/change the checkbox. GGCCheckBox_3398.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.

;