Refer to the Images topic to learn more.
Refer to the Images topic to learn more.
This example describes how to use our file manager control with the Azure File storage / File Service. The main idea is to create a custom file system provider and use Azure SDK to implement all required operations. As a starting point, it is possible to use the Get started with Azure File storage on Windows Microsoft documentation.
To run the example, define the AccountName, KeyValue, and FileShare constants with your credentials in the AzureFileStorageProvider class.
Please note that the Azure Blob Storage is supported in our ASPxFileManager by default. You can review our Demo, where it is shown how to configure the file manager in this case.
See also:
ASPxFileManager - How to implement a List data bound custom file system provider
ASPxFileManager - How to implement a LINQ to SQL based file system provider
The XAF Audit Trail module is intended to track changes being made in persistent objects. This module uses the AuditTrailService class to track changes and write them to the database. It is possible to use this API in a non-XAF application based on XPO, without creating and configuring the DevExpress.ExpressApp > XafApplication object as it is usually done in XAF apps.
To use these features of the Audit Trial module, you will need to reference the DevExpress.Persistent.BaseImpl and DevExpress.Persistent.Base assemblies, which are part of the standard XAF delivery package.
Important notes:
1. You need to have a valid license for the eXpressApp Framework to use this example.
2. AuditTrailService cannot be used with ExplicitUnitOfWork. Use UnitOfWork or Session classes to audit data through AuditTrailService. AuditTrailService creates a new session to save audit records based on the data layer of the audited session. So, the data layer becomes shared among this new temporary session and ExplicitUnitOfWork. This violates the "exclusive owner of the database connection" requirement of ExplicitUnitOfWork.
See Also:
Audit Trail Module Overview
How to reuse XAF Audit Trail module functionality in a non-XAF ASP.NET application
How to track changes made to persistent objects, and write them into a separate table
CANNOT use ExplicitUnitOfWork with the Audit Trail Module:
See: https://www.devexpress.com/Support/Center/Question/Details/T205670
session1.Dictionary.GetDataStoreSchema(typeof(PersistentObject1).Assembly);
session1.Dictionary.GetDataStoreSchema(typeof(PersistentObject2).Assembly);
session1.Dictionary.GetDataStoreSchema(typeof(PersistentObject3).Assembly);
The example demonstrates how to implement an external filter for the ASPxTreeList control and highlight the search text. To accomplish this, use the ASPxTreeList.HtmlDataCellPrepared event to highlight a cell text according to the filter criteria.
NOTE: The "LastName" field is used for filtering.
See also:
E2408: ASPxGridView - creating external filter with the ASPxTextBox and highlighting search text
is it possible to use this external filter using paging in aspxtreelist?
Added By: Les Brinkworth at: 10/4/2017 6:31:01 AM Testing this in Edge Browser, "Run Online" ... Does not work???Added By: Les Brinkworth at: 10/4/2017 6:33:36 AM Doesn't work in Chrome either....Added By: Paul V (DevExpress Support) at: 10/5/2017 3:59:39 AMHello,
I've created a separate ticket on your behalf and suggest you continue discussing this issue in the context of this thread: T562012: E4029 example doesn't work in the Edge browser. I will answer you there shortly.
The best solution to display calculations based on the huge amount of data within the PivotgridControl or ASPxPivotGrid is to create the OLAP Cube and perform all calculations on the SQL server side.
If you cannot use OLAP data source, I suggest you use PivotGrid in the server mode. In version 14.2 we have introduced the server mode support in PivotGrid, thus the approach described in this example is not actual any more. We have added the Obsolete prefix to emphasize this statement. To enable Server Mode, use the following components depending on the target platform:
- ASP.Net - EntityServerModeDataSource and LinqServerModeDataSource;
- Windows Forms - EntityServerModeSource and LinqServerModeSource;
- WPF - EntityServerModeDataSource and LinqServerModeDataSource.
In previous versions it's possible to slightly improve the performance when the PivotgridControl or ASPxPivotGrid is bound to the DataSet. The main idea is to group data when retrieving them from the database. This way, calculations performed on the client side will be reduced, and the pivot grid will load and sort data faster. In this instance, it's necessary to update the data source each time the user moves fields between areas. Otherwise, the pivot grid will display incorrect values.
This example demonstrates how to implement this in a simple case.
See Also:
Analysis Services
Binding to an OLAP Server
How to improve the PivotGrid performance
Any way to improve performance for PivotGrid when using EntityFramework CodeFirst?
I'm trying to run the example code you provided but it seems that some changes should be applied in order for it to work. Can you please specify the changes or prerequisites required for this code to run successfully.
Added By: Sean Winstead 2 at: 12/24/2014 12:15:26 PMI made use of this example in our own code. But I think the Count aggregation doesn't work as expected in certain situations. For example, let's say the report needs to show the # of jobs. The summary type of the field is set to Count. The dynamically-created query includes COUNT(JobID) and the result set includes 3 rows:
Row 1, COUNT(JobID) = 1
Row 2, COUNT(JobID) = 2
Row 3, COUNT(JobID) = 1
The sum of the counts is 4 which is the correct # of Jobs.
But let's say the grid has to perform additional grouping and in our example all 3 rows are combined into one row in the grid. In this case, the grid will display the number of rows (i.e., 3) instead of summing the rows. So the # of jobs is understated by 1 in the rendered report.
Any advice on how to work around this?
Added By: John (DevExpress Support) at: 12/24/2014 11:04:59 PM Hi Sean,Hi Arjun,
I've created a separate ticket for your question on your behalf (T612962: How to write changed data back to the table at detail level ). It has been placed in our processing queue and will be answered shortly.
LayoutGroup/LayoutControl doesn't have the built-in ItemsSource property. In this example, we demonstrated how to provide this functionality using a custom behavior class. This behavior generates LayoutItem controls when the associated collection is changed and adds them to the Children collection of the associated control.
And you also need a guard on ArrangeChildren():[C#]protectedoverridevoidOnAttached(){base.OnAttached();ArrangeChildren();}
[C#]{if(AssociatedObject==null)return;
Hi Andrew,
Your approaches are absolutely correct. I have updated this example to apply them and slightly changed the implementation to make it possible to attach our custom behavior to individual groups. It is now unnecessary to obtain groups by their names, and you also can populate multiple groups within your LayoutControl dynamically.
As for the last issue, please check if it exists in the updated example and let me know your results.
[C#]if(e.Action==NotifyCollectionChangedAction.Reset){varunwantedItems=newList<FrameworkElement>();foreach(varchildinAssociatedObject.Children){if(childisFrameworkElementelement){if(element.DataContextisButtonDescriptor)unwantedItems.Add(element);}}foreach(varunwantedIteminunwantedItems){AssociatedObject.Children.Remove(unwantedItem);}}
[XAML]<UserControlx:Class="ES_Desktop.Views.Policy.Forms.FormView"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"xmlns:conv="clr-namespace:ES_Inf.WPF.Converters;assembly=ES-Inf"xmlns:helper="clr-namespace:ES_Inf.WPF.Helpers;assembly=ES-Inf"xmlns:vm="clr-namespace:ES_Desktop.ViewModels.Policy.Forms"xmlns:local="clr-namespace:ES_Desktop.Views.Policy.Forms"xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"mc:Ignorable="d"d:DesignHeight="800"d:DesignWidth="600"d:DataContext="{dxmvvm:ViewModelSource Type={x:Type vm:FormViewModel}}"><UserControl.Resources><ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionarySource="/ES-Desktop;component/Themes/ControlStyles.xaml"/></ResourceDictionary.MergedDictionaries><DataTemplateDataType="{x:Type TypeName=vm:CardViewModel}"><dxlc:LayoutGroupHeader="{Binding Caption}"Orientation="{Binding Path=FormSection.Vertical, Converter={conv:VertBoolToOrientation}}"ScrollBars="Auto"HorizontalAlignment="Left"VerticalAlignment="Top"View="GroupBox"><dxmvvm:Interaction.Behaviors><helper:ItemsSourceHelperItemsSource="{Binding QuestionViewModels}"/></dxmvvm:Interaction.Behaviors><dxlc:LayoutGroup.GroupBoxStyle><StyleTargetType="dxlc:GroupBox"><Style.Triggers><DataTriggerBinding="{Binding FormSection.HideTitle}"Value="true"><SetterProperty="TitleVisibility"Value="Collapsed"/><SetterProperty="Padding"Value="0"/></DataTrigger></Style.Triggers></Style></dxlc:LayoutGroup.GroupBoxStyle></dxlc:LayoutGroup></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:TableViewModel}"><local:TableView/></DataTemplate><StyleTargetType="dxlc:LayoutItem"><SetterProperty="LabelPosition"Value="{Binding LabelPosition}"/><SetterProperty="AddColonToLabel"Value="True"/><SetterProperty="Visibility"Value="{Binding HideInput, Converter={StaticResource InverseBooleanToVisibilityConverter}}"/><SetterProperty="LabelTemplate"><Setter.Value><DataTemplate><TextBlockText="{Binding}"/></DataTemplate></Setter.Value></Setter><Style.Triggers><DataTriggerBinding="{Binding HideLabel}"Value="False"><SetterProperty="Label"Value="{Binding FormQuestion.ScreenLabel}"/></DataTrigger></Style.Triggers></Style><DataTemplateDataType="{x:Type TypeName=vm:StringQuestionViewModel}"><dxe:TextEditWidth="{Binding ScreenWidth}"EditValue="{Binding Var.Value}"IsReadOnly="{Binding FormQuestion.ReadOnly}"/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:CurrencyQuestionViewModel}"><dxe:SpinEditDisplayFormatString="{Binding FormQuestion.FormatString}"Increment="{Binding Increment}"EditValue="{Binding Var.Value}"Width="{Binding ScreenWidth}"IsReadOnly="{Binding FormQuestion.ReadOnly}"/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:BooleanQuestionViewModel}"><dxe:CheckEditVerticalAlignment="Center"HorizontalAlignment="Left"EditValue="{Binding Var.Value}"IsReadOnly="{Binding FormQuestion.ReadOnly}"/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:CalculatedQuestionViewModel}"/><DataTemplateDataType="{x:Type TypeName=vm:DateQuestionViewModel}"><dxe:DateEditWidth="{Binding ScreenWidth}"EditValue="{Binding Var.Value}"IsReadOnly="{Binding FormQuestion.ReadOnly}"/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:IntegerQuestionViewModel}"><dxe:TextEditWidth="{Binding ScreenWidth}"MaskType="Numeric"Mask="n0"EditValue="{Binding Var.Value}"IsReadOnly="{Binding FormQuestion.ReadOnly}"/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:PhoneQuestionViewModel}"><dxe:TextEditVerticalAlignment="Center"HorizontalAlignment="Left"Margin="5"Width="{Binding ScreenWidth}"MaskType="Regular"Mask="(\d?\d?\d?) \d\d\d-\d\d\d\d"EditValue="{Binding Var.Value}"IsReadOnly="{Binding FormQuestion.ReadOnly}"Visibility="{Binding HideInput, Converter={StaticResource InverseBooleanToVisibilityConverter}}"/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:DropDownQuestionViewModel}"><local:DropdownQuestionView/></DataTemplate><DataTemplateDataType="{x:Type TypeName=vm:ItemSelectQuestionViewModel}"><local:ItemSelectQuestionView/></DataTemplate></ResourceDictionary></UserControl.Resources><Grid><dxlc:LayoutControlOrientation="Vertical"ScrollBars="Auto"><dxlc:LayoutGroupView="Group"Orientation="Vertical"><dxmvvm:Interaction.Behaviors><helper:ItemsSourceHelperItemsSource="{Binding FormSections}"/></dxmvvm:Interaction.Behaviors></dxlc:LayoutGroup></dxlc:LayoutControl></Grid></UserControl>
This sample demonstrates how to use the CustomColumnGroup, CustomColumnSort and CustomGroupDisplayText events to group grid data by values of a specific grid column based on a custom criteria.
See also:
ASPxGridView - How to sort groups
This example illustrates how to load multiple Dictionaries to check spelling of a multi-language text in a simple text box control. Also, you will see how to add a Custom Dictionary so that the end-user can add custom words to it.
"\..\..\Dictionaries\es_ES\es_ES.aff";
Added By: Yulia (DevExpress Support) at: 4/8/2016 5:59:54 AM Hello Muhammad,
Dictionaries used in this Code Example are copied within the sample project, so you can find dictionary files in the corresponding folder.
This example demonstrates how to customize a Grid's settings when it is placed to the UserControl. To do this, it is necessary to create an inherited UserControl and adjust aGrid settings using it.
For more information, please refer to the How to use the grid designer when the grid is inside a UserControl. Knowledge Base article.
See Also:
Can I use the grid on an inherited form or user control?
How to enable visual inheritance for Developer Express controls
How to create a GridView descendant class and register it for design-time use
Starting with v16.1, Spreadsheet provides the capability to handle certain actions in the Controller. So, it is possible to save a document to a database using the Spreadsheet ribbon's 'Save' button.
DataClassesDataContext()
ASP.NET
A complete description for the ASP.NET version is available in the How to: Adjust the Size of Pop up Dialogs displayed in ASP.NET Applications topic.
WinForms
Check out the PopupSizeExample.Module.Win\Controllers\CustomizeFormSizeController.xx file and code comments in it. See also the following product documentation:
Concepts> Extend Functionality> Controllers
DevExpress.ExpressApp> Frame> TemplateChanged
DevExpress.ExpressApp> XafApplication> CustomizeTemplate
DevExpress.ExpressApp.Templates> ISupportStoreSettings> SettingsReloaded
Take special note that certain form templates (e.g., LookupForm, PopupForm, LookupControlTemplate) may have a minimum form size set by default (using the MinimumSize property) or may calculate their size dynamically based on the content. So, if your custom size is ignored using the aforementioned method, you may want to research the source code for each required form template and adjust your default form settings accordingly.
Hello,
I've created a separate ticket on your behalf (T464212: Frame.TemplateChanged property is not static ). It has been placed in our processing queue and will be answered shortly.
[C#]privatevoidOnFormReadyForCustomizations(objectsender,EventArgse){if(YourCustomBusinessCondition(Window.View)){PopupFormpopupForm=senderasDevExpress.ExpressApp.Win.Templates.PopupForm;if(popupForm!=null){popupForm.AutoShrink=false;}((System.Windows.Forms.Form)sender).Size=((IFormSizeProvider)Window.View.CurrentObject).GetFormSize();}}
This example demonstrates how to hide a command button in the grid's CommandColumn by handling the ASPxGridView.CommandButtonInitialize event.
See Also:
How to hide a cell value
How to hide template controls in individual cells
How to conditionally disable the UpdateButton in client code
How to create a custom command button with the appearance and action depending on a row state
How to enable/disable command buttons on the client side
Is there a way to do this based on the data in the row?
Added By: Balaji BLS at: 6/9/2017 2:26:46 AM Hello Support,Hello Balaji,
I've created a separate ticket on your behalf (T524229: GridView - How to customize command buttons in individual rows). It has been placed in our processing queue and will be answered shortly.
The sample illustrates how to save the current ASP.NET MVC Dashboard state (such as master filter or parameter values) to cookies on the client side and restore this state on the server side. The following API is used in this example:
- The ASPxClientDashboard.DashboardStateChanged event is handled to obtain the current dashboard state.
- The ASPxClientUtils.SetCookie client-side method is used to save the dashboard state to cookies.
- The DashboardConfigurator.SetDashboardStateService method is used to apply the dashboard state loaded from the cookies.