Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Collapse]Application UI Manager
   [Collapse]Views
    [Expand]Widget View
    [Collapse]WindowsUI View
     [Collapse]Getting Started
       How To: Create a Message Box Flyout With User Control
       How To: Create a Modal Message Box Flyout
       How To: Create a Page Container
       How To: Create a PageGroup Container
       How To: Create a Pop-up Flyout
       How To: Create a SlideGroup Container
       How To: Create a SplitGroup Container
       How To: Create a TabbedGroup Container
       How To: Create a TileContainer
       How To: Pass Specific Data when Navigating Through Containers
       How To: Create Content Containers Hierarchy
      Windows UI Guidelines
      Content Containers
      Navigation Bars
      WindowsUI Buttons
      Flyouts
      Search Panel
      Designer
      Application Hierarchy and Module Navigation
     Tabbed View
     Native MDI View
     Document Selector
     Non-Document Mode
    Documents
   [Expand]Deferred Load
   [Expand]Interaction with Dock Panels
   [Expand]Bar and Ribbon Merging
   [Expand]Examples
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How To: Pass Specific Data when Navigating Through Containers

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4613.

The start-up application screen contains a Page container (page1) with a GridControl. Double-clicking a grid row takes a user to page2, which contains a separate Grid with detailed employee information. Both containers' documents contain user controls (ucGeneral and ucDetails, respectively).

  1. In the Designer's "Navigation Tree" tab, drag Page2 to the Page1 "Children" line. By doing so you assign Page1 to the Page2's BaseContentContainer.Parent property and make it possible for end-users to navigate back from the detailed employee information page.

  2. Handle the WindowsUIView.NavigatedTo event, and assign the details Page to the NavigationEventArgs.Parameter property.
  3. Implement the ISupportNavigation interface and expose its ISupportNavigation.OnNavigatedTo and ISupportNavigation.OnNavigatedFrom methods for both UserControls. At application start-up, the OnNavigatedTo method for the ucGeneral UserControl receives the details page as a parameter from the NavigatedTo event that was handled in the previous step.
  4. Set the ColumnViewOptionsBehavior.Editable property to false, so that you can handle the double-click event. This property is located in the GridView.OptionsBehavior section.
  5. Handle the GridView's double click event and call the IBaseViewController.Activate method to navigate to the details page.
  6. Handle the OnNavigatedFrom method for the general page and assign the focused row to the Parameter property. This parameter is passed to the OnNavigatedTo method of the details page, and you are able to retrieve any required data and fill the details page. In this example, a simple filter criteria is applied.

How would you rate this topic?​​​​​​​