Vous êtes sur la page 1sur 3

Q319743 - Access current detail view and all list view from WindowController | DevExpress Support Center

25-May-15
Log In

Products

Free Trials & Demos

Buy

SUPPORT CENTER

Support
Tickets

My Account
Examples

About Us
Localization

Type search string and press Enter

solutions

Access current detail view and all list view from WindowController
Tags: .NET, Frameworks (XAF & XPO), eXpressApp Framework

Training Events

FAQ

Submit a Support Ticket

Imported from SC 1.0


ID:
Q319743

Andrey Maksimov 5 years ago

Created O n :
4/27/2011 1:56:53 PM
Mo dified O n :
4/29/2011 11:55:03 AM

Hello!
I want to ask how to get current DetailView and all ListView from WindowController?
Thank you!

B u ild:
v2010 vo l 2.8 / 25-Ap r-2011
O p eratin g System:
W in do w s 7
IDE:
Micro so ft Visu al Stu dio 2010

Dennis (DevExpress Support) 5 years ago


Hello Andrey,
Thank you for contacting us.
The WindowController class has the Window.View property that can be used for your task (SDI UI).
In MDI UI scenarios you can use the Windows property of the ShowViewStrategy class.
I hope you find this information helpful.
Thanks,
Dennis

Related Questions
Ho w to traverse an d cu sto mize XAF
View items an d th eir u n derlyin g
co n tro ls
Ho w to sh o w sto red p ro cedu re's
resu lts in a ListView fro m n avigatio n
Ho w to h ide all co n tro llers in View
Mo de.
Deb u ggin g datab ase access
Do cu men tatio n - Describ e h o w to
detect a lo o k-u p List View

Andrey Maksimov 5 years ago


Sh o w Mo re

Im sorry, im not quite familiar with Controllers yet. How i can obtail every Detail and List views by using Window.View property?
Thank you!

Dennis (DevExpress Support) 5 years ago


Hello Andrey,
Thank you for the feedback.
I suggest you review the following help topics to learn more about controllers:
http://documentation.devexpress.com/#Xaf/CustomDocument2621
http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppControllertopic
http://documentation.devexpress.com/#Xaf/CustomDocument2608
http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppWindowControllertopic
http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppViewControllertopic
You cannot obtain every DetailView and ListView using the Window.View property. It is applicable for certain scenarios only. See my reply above.
If you are having difficulties with a concrete scenario, please describe it in greater detail and we will be glad to help you further.
Thanks,
Dennis

Andrey Maksimov 5 years ago


I will restate my goal with more details.
I have created custom ObjectSpace with few custom parameters. I need to implement WindowController with a SingleAction, so the user can change some
of the parameters by using it. When user saves changes made by usng this SingleAction, i need to modify this parameters for every ObjectSpace, used in the
current form.
I figured, i need the list of all ListViews and DetailView to change its ObjectSpace parameters.
Was my explanation of any help?
Thank you!

Dennis (DevExpress Support) 5 years ago


Hello Andrey,
Thank you for providing additional information on your scenario. According to your explanation, it looks like these parameters are global in your application

https://www.devexpress.com/Support/Center/Question/Details/Q319743

1/3

Q319743 - Access current detail view and all list view from WindowController | DevExpress Support Center

25-May-15

and so they should be declared in your custom ObjectSpace class as static.


If you do so, you will not need to iterate through all opened windows in your application - everything will work by default. This is the best solution in my
opinion.
I am looking forward to hearing from you.
Thanks,
Dennis

Andrey Maksimov 5 years ago


I found that single ObjectSpace is used for DetailView and all ListViews on the form, so thats solve it. But any way, i still need to check all ListViews for correct
criteria.
Thanks!

Dennis (DevExpress Support) 5 years ago


Hello Andrey,
Thank you for the update. To be honest, I am not certain about the criteria you are talking about.
Also, did you implement the suggested solution?
>>
According to your explanation, it looks like these parameters are global in your application and so they should be declared in your custom ObjectSpace class
as static.
If you do so, you will not need to iterate through all opened windows in your application - everything will work by default. This is the best solution in my
opinion.
<<
If you want to iterate through all nested Views of a certain DetailView or a dashboard View, you will have to access its Items property and check for a particlar
ViewItem type and its properties. For example, nested Views will be linked to DashboardViewItem, ListPropertyEditor and DetailPropertyEditor objects. See
also: http://community.devexpress.com/blogs/eaf/archive/2011/03/04/one-more-dive-into-the-xaf-views-structure.aspx
I think you can update all the ListViews after you save your GlobalOptions objects.
I hope you find this information helpful.
Thanks,
Dennis

Andrey Maksimov 5 years ago


Thank you for your explanation, i think it will be sufficient and i can use that. As for the GlobalOptions its not usable in my scenarion, well, partly usable, but i
still need to check up all list vews regardless.
Thank you!

Dennis (DevExpress Support) 5 years ago


Good, thank you for the feedback. Do not hesitate to contact me further in case of any difficulties.
Regards,
Dennis

DEVEXPRESS
About Us
News
Our Awards
Upcoming Events
User Comments
Case Studies
Reviews and Publications
Licensing
Purchasing
MVP Program
Contact Us
Logos

.NET CONTROLS
WinForms
ASP.NET
MVC
WPF
Silverlight
Windows 8 XAML
CROSS PLATFORM
Reporting
Document Automation

MOBILE
DevExtreme Mobile

HTML5 JS WIDGETS
DevExtreme Web

ENTERPRISE TOOLS
Report Server
Analytics Dashboard

iOS 7
DataExplorer

FRAMEWORKS
eXpressApp Framework
CODE-DEBUG-REFACTOR
CodeRush for Visual Studio

FUNCTIONAL WEB TESTING


TestCafe
DELPHI C++BUILDER
VCL

SUPPORT
Search the Knowledge Base
My Questions
Code Examples
Getting Started
Demos
Documentation
Blogs
Training
Webinars
Current Version/Build
Version History

FOLLOW US

https://www.devexpress.com/Support/Center/Question/Details/Q319743

2/3

Q319743 - Access current detail view and all list view from WindowController | DevExpress Support Center

25-May-15

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business


Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance
HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether
using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you
build and deliver your best in the shortest time possible.

Your Privacy - Legal Statements

https://www.devexpress.com/Support/Center/Question/Details/Q319743

Copyright 1998-2014 Developer Express Inc.


All trademarks or registered trademarks are property of their respective owners

3/3

Vous aimerez peut-être aussi