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.
Syncfusion Feedback

Virtual grid - dropdown buttons aren''t always removed when current row changes

Thread ID:

Created:

Updated:

Platform:

Replies:

18667 Sep 7,2004 10:08 AM UTC Sep 9,2004 01:56 PM UTC Windows Forms 5
loading
Tags: GridControl
Simon Spruzen
Asked On September 7, 2004 10:08 AM UTC

I''m using syncfusion 2.1.0.9 essential grid with the following settings: gridStyleInfo1.ShowButtons = Syncfusion.Windows.Forms.Grid.GridShowButtons.ShowCurrentRow; This used to work fine with 2.0.5.1, but now from time to time, the combobox cells don''t get their dropdown buttons removed when the current row changes, unless I set: this.gridControl.RefreshCurrentCellBehavior = Syncfusion.Windows.Forms.Grid.GridRefreshCurrentCellBehavior.RefreshRow; which I don''t want to do as it slows down rendering. In version 2.0.5.1 I could do: gridStyleInfo1.ShowButtons = Syncfusion.Windows.Forms.Grid.GridShowButtons.ShowCurrentRow; this.gridControl.RefreshCurrentCellBehavior = Syncfusion.Windows.Forms.Grid.GridRefreshCurrentCellBehavior.None; and all worked fine. Any ideas?

Administrator [Syncfusion]
Replied On September 7, 2004 11:57 AM UTC

You can handle the CurrentCellMoved event. In your handler, call grid.RefreshRange, passing in GridRangeInfo.Cell(grid.CurrentCell.MoveFromRowIndex, grid.CurrentCell.MoveFromColIndex). This should just redraw the single cell.

Simon Spruzen
Replied On September 9, 2004 04:55 AM UTC

Tried this - but unfortunately the last current cell wasn''t the combo box, so it never gets refreshed. My virtual grid has two columns: col 1 - a combobox col 2 - an edit control. If I click line 1 col 2, followed by line 2 col 2, the combo button in line 1 col 1 isn''t removed.

Administrator [Syncfusion]
Replied On September 9, 2004 05:17 AM UTC

In your CurrentCellMoved handler, do not use grid.CurrentCell.MveFromColIndex to decide what cell to refresh. Instead, always refresh your combobox column (just relying on grid.CurrentCell.MoveFromRowIndex to retrieve the last row).

Simon Spruzen
Replied On September 9, 2004 01:13 PM UTC

Ok will try. Is this a bug with 2.1.0.9?

Administrator [Syncfusion]
Replied On September 9, 2004 01:56 PM UTC

2.1.0.9 has the correct behavior. Before it was refreshing the row even when the user said not to. Now it will only refresh the row when the user indicates he wants it by setting GridRefreshCurrentCellBehavior.RefreshRow. In my previous posts, I was thinking that the old row was the one not being refreshed (leaving the button displayed when it should not be). But I now realize it may be the new row that is not shwoingteh button. If that is teh case, you can do exactly what I described above, but use grid.CurrentCell.MoveToRowIndex instead of MoveFromRowIndex. So, if you want to use this ShowButtons = CurrentRow setting, then you will either have set the GridRefreshCurrentCellBehavior.RefreshRow property or handle some event like CurrentCellMoved and refresh the cell yourself.

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

;