Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all 7205 articles
Browse latest View live

Lesson 1 - Creating a Simple WinForms MVPVM Applicaiton

$
0
0
This example demonstrates how to build a simple WinForms application that follows the MVPVM pattern.

>> Lesson 1 - Create a Simple MVPVM Application (Step-by-step description)
Lesson 2 - Commands. Presenter. (Step-by-step description) (Example)
Lesson 3 - Interaction Between Views. Services. (Step-by-step description) (Example)
Lesson 4 - Navigation in MVPVM Applications (Step-by-step description) (Example)
Lesson 5 - Advanced MVPVM Application (Step-by-step description) (Example)
Lesson 6 - Multi-level navigation in MVPVM applications (Step-by-step description) (Example)
Question Comments

Added By: Pavlov Pavel at: 9/8/2014 5:40:49 PM    

Hello!
Can you provide guide or example for integrating XPO in MVPVM application? How to add data access layer to MVPVM application? For instance in Lesson 1 used object Task - POCO class, but how to use Task as XPObject?

Added By: Svetlana (DevExpress Support) at: 9/9/2014 6:50:30 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: How to implement MVPVM with XPO . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Jason Lee 21 at: 2/2/2015 7:30:41 PM    

Which Visual Studio Version is compatible with this example?

Added By: Alexey Z (DevExpress Support) at: 2/2/2015 11:59:32 PM    

Hello,

This example is compatible with the MS Visual Studio version 2012 and higher. I.e., with an IDE which supports the .NET Framework version 4.5. I have added this information to the corresponding field in the example's profile.

Added By: Mohamed Yousif 3 at: 7/11/2015 3:40:13 AM    

Hi,
I can't find the "Step-by-step description" every time I click the link it redirect me to this link:
https://documentation.devexpress.com/#WindowsForms/CustomDocument7874

Could you give me the right link for the description of this examples please ?


ASPxGridView - Cell Merging

$
0
0

The example shows how to implement the cell merge feature for the ASPxGridView control.
You can use the helper class that will perform cell merging for the grouped grid as well.
Please keep in mind that functionality such as row selection, in-place editing and focused row may not work as expected which is understandable.

Question Comments

Added By: Seonkyeong Min at: 5/11/2015 2:23:37 PM    

Hello, This example is not working well.

First Line is complex.

other lines is works.

i wanna attach an image file.
but i cant upload the image because you guys doesn't have upload file function.

Added By: Larry (DevExpress Support) at: 5/12/2015 12:33:07 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T240441: ASPxGridView - Issue with a cell merging. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Jay Gamblin at: 5/29/2015 10:41:37 AM    

This does not appear to work with 14.2.5.  I get  'ASPxClientTableFixedColumnsHelper' is undefined

Added By: Anthony (DevExpress Support) at: 6/1/2015 4:28:57 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T249336: E970 - 'ASPxClientTableFixedColumnsHelper' is undefined. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Balmukund Shrivastav at: 7/13/2015 12:13:52 AM    

Thanks for the helper class. this functionality is working first time on the page load for ASPxGridView v12.1, but grid get distorted when we try to filter the records. Appreciate if you could provide some help.

Thank you,
Blamukund

Added By: Mike (DevExpress Support) at: 7/13/2015 12:18:28 AM    

Hello Blamukund,

To process your recent post more efficiently, I created a separate ticket on your behalf: T266070: E970 for version 12.1. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

GridView - How to copy cell data in an Excel format (BIFF8) to the clipboard using XL Export library facilities

$
0
0

This example demonstrates how to build data in BIFF8 format and pass it to the clipboard. This approach allows you to copy cells data within appearance (text alignment, borders, background color and font settings) and keep the cells number format as is while copy&paste data from a GridControl to an Excel-like document.


                                                                        

How to locate field value cells matching a particular condition

$
0
0

The following example demonstrates how to handle the CustomFieldValueCells event to locate a specific column/row header identified by its column's/row's summary values.
In this example, a predicate is used to locate a column that contains only zero summary values. The column header is obtained by the event parameter's FindCell method, and then removed via the Remove method.

How to remove standard bar items and add custom ones to the DocumentPreviewControl toolbar

$
0
0

This example demonstrates how to customize the DocumentViewerControl's toolbar (either BarManager or RibbonControl).

In particular, it shows how to remove standard commands from a Ribbon toolbar and add custom ones.

How to perform certain actions after each callback (like MVCxGlobalEvents)

$
0
0

The main idea is to handle the jQuery.ajaxSuccess event for the document element, which is raised after each callback.

[JScript]
$(document).ajaxSuccess(function(){.................});


Starting with v.13.2, we've introduced the MVCxClientGlobalEvents object (see ASP.NET MVC - Provide the capability to handle the CallbackError event globally (implement an ASPxGlobalEvents equivalent)
It's possible to use the MVCxClientGlobalEvents.ControlsInitialized event handler for this purpose: 

[JScript]
MVCxClientGlobalEvents.AddControlsInitializedEventHandler(function(s, e){if(e.isCallback){//some action}});

 

Note that this event will be raised only for DevExpress callbacks.

See also: 
Ajax Events

Lesson 2 - Binding Commands in the WinForms MVPVM application

$
0
0
The described approach is related to the preview version of our MVVM Frameworks for WinForms. We've significantly improved its API. Please refer to the new documentation (WinForms MVVM) and the code example (MVVM Best Practices).
______________________________

Lesson 1 - Create a Simple MVPVM Application (Example)
>> Lesson 2 - Commands. Presenter.
Lesson 3 - Interaction Between Views. Services. (Example)
Lesson 4 - Navigation in MVPVM Applications (Example)
Lesson 5 - Advanced MVPVM Application (Example)
Lesson 6 - Multi-level navigation in MVPVM applications (Example)
Question Comments

Added By: Wade Fleming at: 9/4/2014 4:28:54 AM    

Is there a description/overview to go along with these MVPVM examples?

Added By: Olga (DevExpress Support) at: 9/4/2014 5:44:54 AM    Hello,
You can find these lessons there: WinForms MVPVM
Please let us know if you have further questions.

Lesson 3 - Create a WinForms MVPVM applicaiton with multiple Views

$
0
0
The described approach is related to the preview version of our MVVM Frameworks for WinForms. We've significantly improved its API. Please refer to the new documentation (WinForms MVVM) and the code example (MVVM Best Practices).
______________________________

Lesson 1 - Create a Simple MVPVM Application (Example)
Lesson 2 - Commands. Presenter. (Example)
>> Lesson 3 - Interaction Between Views. Services.
Lesson 4 - Navigation in MVPVM Applications (Example)
Lesson 5 - Advanced MVPVM Application (Example)
Lesson 6 - Multi-level navigation in MVPVM applications (Example)

Lesson 4 - Simple Navigation in MVPVM Application

$
0
0
The described approach is related to the preview version of our MVVM Frameworks for WinForms. We've significantly improved its API. Please refer to the new documentation (WinForms MVVM) and the code example (MVVM Best Practices).
______________________________

Lesson 1 - Create a Simple MVPVM Application (Example)
Lesson 2 - Commands. Presenter. (Example)
Lesson 3 - Interaction Between Views. Services. (Example)
>> Lesson 4 - Navigation in MVPVM Applications
Lesson 5 - Advanced MVPVM Application (Example)
Lesson 6 - Multi-level navigation in MVPVM applications (Example)
Question Comments

Added By: Syed Ali 14 at: 6/12/2015 5:51:27 AM    

Hi Team,
As devexpress v.15 is released, Tutorials (Step-by-step description) are removed. The links do not exist any more. Please put them back. Thanks
Ali

Added By: Dimitros (DevExpress Support) at: 6/12/2015 5:59:19 AM    

 Hello Ali,

Thank you for informing us about this issue. We will update the links soon.

Added By: James (DevExpress) at: 6/12/2015 9:57:37 AM    

Greetings Ali,

This solution, as well as the other 5 examples, is related to old MVVM lessons written when our MVVM Framework was in the beta state. With the release of version 15.1, the Framework is officially ready and we now have completely new step-by-step tutorials. You can find them here.

The old lessons will no longer be available.

Lesson 5 - Complex Navigation in MVPVM Application

$
0
0
The described approach is related to the preview version of our MVVM Frameworks for WinForms. We've significantly improved its API. Please refer to the new documentation (WinForms MVVM) and the code example (MVVM Best Practices).
______________________________

Lesson 1 - Create a Simple MVPVM Application)(Example)
Lesson 2 - Commands. Presenter. (Example)
Lesson 3 - Interaction Between Views. Services. (Example)
Lesson 4 - Navigation in MVPVM Applications (Example)
>> Lesson 5 - Advanced MVPVM Application
Lesson 6 - Multi-level navigation in MVPVM applications (Example)
Question Comments

Added By: Pavlov Pavel at: 8/4/2014 11:15:04 PM    

Hi!
If I run attached example I get runtime error:

System.ArgumentNullException was unhandled
 HResult=-2147467261
 Message=Value cannot be null.
Parameter name: key
 Source=mscorlib
 ParamName=key
 StackTrace:
      at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
      at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
      at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
      at DevExpress.XtraBars.Navigation.OfficeNavigationBar.EndInit()
      at MvpvmNavigation.Form1.InitializeComponent() in c:\Projects\dxSample3\MvpvmNavigation\Form1.Designer.cs:line 149
      at MvpvmNavigation.Form1..ctor() in c:\Projects\dxSample3\MvpvmNavigation\Form1.cs:line 25
      at MvpvmNavigation.Program.Main() in c:\Projects\dxSample3\MvpvmNavigation\Program.cs:line 16
 InnerException:

I have MSVS2012, Windows 7, DevExpress 14.1.4.

Added By: Pavlov Pavel at: 8/4/2014 11:18:57 PM    

I was debug with sources and find that exception thrown in TileNavigation.cs:
public void EndInit() {
if(IsNavigationClientAttached) {
UpdateItems(NavigationClient.ItemsSource);
var selectedNavigationBarItem = itemsSourceItems[NavigationClient.SelectedItem]; // -- NavigationClient.SelectedItem IS NULL!!!
if(SelectedItem != selectedNavigationBarItem)
SelectedItem = selectedNavigationBarItem;
}
EnsureAutoSize();
initLock = 0;
}

Added By: Svetlana (DevExpress Support) at: 8/4/2014 11:44:23 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T136931: An exception is thrown in the OfficeNavigationBar.EndInit method. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

ticket. Please refer to it. 

Lesson 6 - Multi-level navigation in MVPVM applications

$
0
0
The described approach is related to the preview version of our MVVM Frameworks for WinForms. We've significantly improved its API. Please refer to the new documentation (WinForms MVVM) and the code example (MVVM Best Practices).
______________________________

This example demonstrates how to implement a multi-level navigation in MVPVM application.

Lesson 1 - Create a Simple MVPVM Application (Example)
Lesson 2 - Commands. Presenter. (Example)
Lesson 3 - Interaction Between Views. Services. (Example)
Lesson 4 - Navigation in MVPVM Applications (Example)
Lesson 5 - Advanced MVPVM Application(Example)
>>
Lesson 6 - Multi-level navigation in MVPVM applications

PopupContainerEdit - How to always show size grip of the popup drop down on the right size

$
0
0
This example illustrates how to show the size grip of the PopupContainerEdit always on the right size regardless the location and closeness the drop down to screen edge

How to use the Messenger in a CRUD application

$
0
0

This example shows how to create a CRUD application based on the DevExpress MVVM Framework.
It uses the Entity Framework Code First technology to work with a database and the DevExpress POCO technology to create ViewModels.
The Messenger is used for implementing interaction between ViewModels.
Views are built with the DevExpress Scaffolding Wizards.

Question Comments

Added By: Christian Weber 4 at: 7/13/2015 11:30:51 PM    

I just downloaded the example. I get an exception (System.Data.Entity.Core.ProviderIncompatibleException) when I want to execute the program. The exception is thrown in EmployeeCollectionViewModel::Initialize(), Line 73 (EmployeeContext.Employees.Load();).

Version: 15.1.4.0 (Trial)

Added By: Ivan (DevExpress Support) at: 7/14/2015 3:38:05 AM    Hi Christian,

I have created a new ticket on your behalf regarding this issue - ProviderIncompatibleException occurs when running E5001. Let's continue our discussion there.

How to show detail information in a separate ASPxGridView

$
0
0

This example demonstrates how to use two ASPxGridView instances to show the master-detail data. Detail data is displayed in an external ASPxGridView when a master ASPxGridView's focused row index is modified.

MVC Version:
E3891: How to export multiple GridViews into a single print document

See Also:
E2529: How to show the ASPxGridView's detail information in the ASPxDataView
E1285: How to display master-detail tables in two grids on separate tabs of a PageControl
E2193: How to display detail data within a popup window

Question Comments

Added By: Robert Burgan at: 4/1/2015 12:31:34 PM    

I copied this code and added it to my grid. When I put a breakpoint at the Protected Sub gvDetail_CustomCallback sub, it does not reach it when I click the select button in the grid.

Added By: Larry (DevExpress Support) at: 4/1/2015 2:02:15 PM    Hello,

I have provided the answer for this issue in the ASPxGridView - How to show an additional information in second grid when the row is selected in the first one thread. 

How to create a custom font edit control that supports a skinned font dialog

$
0
0

In this example we have created a FontEdit descendant that supports a skinned font dialog, which is identical to a standard font dialog, in an Editing mode.

Question Comments

Added By: Luis Oliva Laurent at: 1/13/2014 3:43:16 PM    

This sample does not work, nor even compile!!

Added By: Meer Shazadi at: 7/14/2015 7:13:02 AM    

Hi, DevExpress Team. Thanks for providing us Support.
I need your help. Would you like to provide this solution as in the form of Visual Studio Solution (a complete project).
It's difficult for us  to understand here and implement in our problems.
It would be pleasure for us. Kindly please do this favor for us.

Added By: Alisher (DevExpress Support) at: 7/14/2015 8:26:38 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T266899: How to create a custom font edit control that supports a skinned font dialog. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


How to speed up Windows Forms applications, running in a Remote Desktop Services (formerly known as Terminal Services) environment

$
0
0

To achieve this goal, you can disable visual styles, skins, animations, and set various controls options. Note that here we additionally disable visual effects of two most "expensive" controls: RibbonControl and BarManager, which provide bars, docking functionality, context menus, alert windows and a Ribbon interface for your .NET WinForms applications. The attached example shows how to do this by an example of an XAF Windows Forms application. If you do not use XAF, then you can obtain the necessary code from this example, and put it in the entry point of your application (usually it's the Main method).

IMPORTANT NOTE
1. You can greatly reduce memory consumption if you use the BarManager instead of RibbonControl on your forms. For example, an XAF Windows Forms application with BarManager consumes half as much memory than the same application using the RibbonControl. In XAF you can switch between the standard bars and ribbon menu using the FormStyle property of the Options node in the Model Editor.
2. To avoid painting problems when using the RibbonForm and RibbonControl on Vista or Windows 7 with the Aero theme enabled, don't set the System.Windows.Forms.Application.VisualStyleState property to VisualStyleState.NoneEnabled. Alternatively, you can set the RibbonForm.AllowFormGlass property to false. This is because we use the VisualStyleRenderer to draw text on transparent headers.

See Also:
Add a new static property to the XtraAnimator class which will allow a developer to disable animation in all DevExpress controls
Performance Tuning CPU Use for 16 and 32-bit Windows Applications
Build Your Skills: How to optimize apps to run in Terminal Services
Tuning applications for the Terminal Services
Performance Tuning Guidelines for Windows Server 2008

Question Comments

Added By: Carlitos at: 3/9/2015 10:19:37 PM    

I am trying this code in my windows client but can't get it to work. In the ResolveTemplate method the formTemplate is always null because the IFrameTemplate template is DevExpress.ExpressApp.Win.Templates.Bars.MainFormV2

Added By: Dennis (DevExpress Support) at: 3/10/2015 5:49:28 AM    

@Carlos: Starting with v14.2, new templates for the main and detail forms are used in XAF. So, you should check for the RibbonForm type instead of the XtraFormTemplateBase one from within the ResolveTemplate method when customizing the ribbon template. I have attached the updated code below. We'll consider updating this example accordingly in the future.


[C#]
usingDevExpress.ExpressApp;usingDevExpress.ExpressApp.Templates;usingDevExpress.ExpressApp.Win.Controls;usingDevExpress.LookAndFeel;usingDevExpress.Skins;usingDevExpress.XtraBars;usingDevExpress.XtraBars.Controls;usingDevExpress.XtraBars.Ribbon;namespaceDisableVisualStylesModule.Win{publicclassDisableVisualStylesWindowController:WindowController{publicDisableVisualStylesWindowController(){TargetWindowType=WindowType.Main;}protectedoverridevoidOnActivated(){base.OnActivated();DisableVisualStyles();}protectedoverridevoidOnDeactivated(){base.OnDeactivated();Application.CustomizeTemplate-=Application_CustomizeTemplate;}privatevoidApplication_CustomizeTemplate(objectsender,CustomizeTemplateEventArgse){ResolveTemplate(e.Template);}protectedvirtualvoidDisableVisualStyles(){if(System.Windows.Forms.SystemInformation.TerminalServerSession){Application.CustomizeTemplate+=Application_CustomizeTemplate;InitGlobalOptions();}}protectedvirtualvoidInitGlobalOptions(){Animator.AllowFadeAnimation=false;SkinManager.DisableFormSkins();SkinManager.DisableMdiFormSkins();BarAndDockingController.Default.PropertiesBar.MenuAnimationType=AnimationType.None;BarAndDockingController.Default.PropertiesBar.SubmenuHasShadow=false;BarAndDockingController.Default.PropertiesBar.AllowLinkLighting=false;System.Windows.Forms.Application.VisualStyleState=System.Windows.Forms.VisualStyles.VisualStyleState.NoneEnabled;}privatevoidResolveTemplate(IFrameTemplatetemplate){IBarManagerHolderformTemplate=templateasIBarManagerHolder;if(formTemplateisRibbonForm){InitRibbonOptions(((RibbonBarManager)formTemplate.BarManager).Ribbon);}else{InitBarOptions(formTemplate.BarManager);UserLookAndFeel.Default.SetWindowsXPStyle();}}protectedvirtualvoidInitRibbonOptions(RibbonControlribbon){if(ribbon!=null){ribbon.ItemAnimationLength= 0;ribbon.GroupAnimationLength= 0;ribbon.PageAnimationLength= 0;ribbon.ApplicationButtonAnimationLength= 0;ribbon.GalleryAnimationLength= 0;ribbon.TransparentEditors=false;InitBarOptions(ribbon.Manager);}}protectedvirtualvoidInitBarOptions(BarManagermanager){if(manager!=null){manager.AllowItemAnimatedHighlighting=false;}}}}
Added By: Carlitos at: 3/10/2015 11:22:35 AM    

Thank you Dennis! Works like a charm!!!

Added By: Arjan van Dijk at: 7/14/2015 2:40:57 PM    

You can also consider ngen.exe to speed up

How to set tab stops so that each tab is of certain characters width

$
0
0

This example illustrates how you can set monospaced font as the document default font and use the MeasureSingleLineString method to calculate the width of a string composed of four characters. This value is used to specify tab stops in a new document.

Question Comments

Added By: Anders Wang at: 7/14/2015 7:18:19 PM    

Hi,
This way cannot work for plaintext format. why not to native support the Tabstop Width functionality?

ListBox - Moving items between ListBoxes 

$
0
0
This example illustrates how to move items between two Overview - ListBox extensions. Note that we are using CheckColumn selection mode (see ListBoxProperties.SelectionMode) to be able to select and handle multiple items at a time.
Question Comments

Added By: Hari haran 3 at: 7/14/2015 11:33:21 PM    

Awesome. Thanks dude :)

dxTabs - How to display a content based on the selected tab - AngularJS Approach

dxTabs - How to display a view based on the selected tab

$
0
0

This example demonstrates how to display a view based on the selected tab. The main idea is to use the if binding to display an appropriate partial view based on the selected tab index.

 

 See also: 
T267165: dxTabs - How to display a content based on the selected tab - AngularJS Approach

Question Comments

Added By: David Ninnes 2 at: 5/11/2015 5:47:18 PM    

How would you create a viewmodel to be loaded for Tab0?

I've tried creating a Tab0.js and loading it in the index.html but it doesn't get loaded.

Application1.Tab0 = function (params) {
   var viewModel = {
       viewShown: function () {
           alert('here');
       },
   };
   return viewModel;
};

Added By: David Ninnes 2 at: 5/11/2015 5:57:55 PM    

...  I added this   
<!-- ko with: Application1.Tab0 -->
to Tab0.dxview and the viewModel is built but the viewShown method isn't called still

Added By: Marion (DevExpress Support) at: 5/11/2015 10:00:25 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T240390: dxTabs - How to display a view based on the selected tab. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Viewing all 7205 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>