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

Grouping grid and CurrencyManager

Thread ID:

Created:

Updated:

Platform:

Replies:

30347 Jun 16,2005 12:04 PM UTC Jun 17,2005 03:14 PM UTC WinForms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 16, 2005 12:04 PM UTC

I am trying to make the grid scroll a row with an error into view. To do this, I set currencyManager.Position = rowIndex; However, I get inconsistent behaviour from the grid. Sometimes the row is scrolled into view and somethimes not. If the cursor is already positioned on that row, but scrolled out of view, the grid scrolls the row back into view. However, if the cursor has been placed on another row, the row with the error is not scrolled into view. I have checked that the gridGroupingControl1.CurrencyManager.CurrentChanged event is fired and that the Position property of the currency manager is correct. Do you have any idea what can be the problem here? I would like a solution that always scrolls the row into view (and expands any collapsed groups as necessary).

Administrator [Syncfusion]
Replied On June 16, 2005 01:42 PM UTC

Try code like: GridRecord rec = this.gridGroupingControl1.Table.Records[rowIndex] as GridRecord; rec.SetCurrent(); to see if it does what you want.

Administrator [Syncfusion]
Replied On June 16, 2005 03:56 PM UTC

I would prefer not to deal directly with the grid, since I may have more than one grid bound to the same source. I believe the idea of data binding is that all the bound controls should update their positions when the position of the underlying currency manager changes. Isn''t this the case for the grouping grid?

Administrator [Syncfusion]
Replied On June 16, 2005 07:57 PM UTC

Only if all controls are using the same bindingcontext. But setting GridRecord rec = this.gridGroupingControl1.Table.Records[rowIndex] as GridRecord; rec.SetCurrent(); should properly position the currencymanager that the grid is using. So, it would not make any difierence whether the grid moved first and teh currencymanager responded, or that the currencymanager moved first and the grid responded. If you can upload a sample project showing the problem, we can try to see why setting the currencymanager is not working in this case.

Administrator [Syncfusion]
Replied On June 17, 2005 03:14 PM UTC

Hi Clay. I did some more testing, and it turned out that the grid does not react to the PositionChanged event of the currency manager if it is grouped and there is no selected record. This happens if you click one of the grouping headers for example. To solve the problem I subscribed to the PositionChanged event of the currency manager and there I used the code you suggested above. (Had to replace Records by UnsortedRecords). Now it seems to work fine.

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

;