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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Events in DataGridControl related to navigation

Thread ID:





90499 Oct 5,2009 05:11 PM UTC Oct 6,2009 09:39 AM UTC WPF 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 5, 2009 05:11 PM UTC

We're trying to use the DataGridControl control in a master/detail view situation.

As part of this, we're attempting to use some of the events on this control to track the currently active cell, and assign a secondary user control in the window based off the element assigned in the current cell.

Right now, we're attempting this using the CurrentCellActivating and CurrentCellActivated events. However, we've run into two issues.

1) Setting cancel=true in CurrentCellActivating doesn't seem to prevent the current cell from switching. Is there a better event we should be using to prevent this? (We want to be able to keep the user from changing "rows" in the grid, under certain circumstances).

2) CurrentCellActivated seems to fire BEFORE SelectedItem has changed. Right now, we're trying to set the detail UI off the grid control's SelectedItem property in CurrentCellActivated, but this seems to be the "item" corresponding to the LAST active cell, even though it's in the Activated event. What can we use to correctly track this information?

Thank you.

Clay Burch [Syncfusion]
Replied On October 6, 2009 09:39 AM UTC

Here is a sample that shows one way to get master-details GridDataControls working. It uses CurrentCellMoved to sync up the details grid with the master grid. It also uses QueryCellInfo to disable any row that you do not want to become current for some reason.

If you are using our 7.4 (preview code), you will get a syntax error on a couple lines involving:


There is a new API for later releases. In the later code, try using:




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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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