The following example demonstrates how to bind a Card dashboard item to data in code.
How to bind a Card dashboard item to data in code
How to create a new Dashboard, add a Grid dashboard item to it and bind it to data in code
The following example demonstrates how to bind a Grid dashboard item to data in code.
See Also:
How to customize a dashboard layout
Prism - How to define Prism regions for various DXDocking elements
Since Prism RegionManager supports standard controls only, it is necessary to write custom RegionAdapters (a descendant of the Microsoft.Practices.Prism.Regions.RegionAdapterBase class) in order to instruct Prism RegionManager how to deal with DXDocking elements.
This example covers the following scenarios:
Using a LayoutPanel as a Prism region. The LayoutPanelAdapter class creates a new ContentControl containing a View and then places it into a target LayoutPanel.
Using a LayoutGroup as a Prism region. The LayoutGroupAdapter creates a new LayoutPanel containing a View, and then adds it to a target LayoutGroup’s Items collection,
Using a DocumentGroup as a Prism region. The DocumentGroupAdapter behaves similarly to the LayoutGroupAdapter. The only difference is that it manipulates DocumentPanels.
Question Comments
Added By: K.Wessing at: 6/21/2012 1:19:15 AM
starting in version 12.1 I get an exception, in version 11.2 the sample did work
(I based my application on this)
System.ArgumentException was unhandled by user code
Message=This RegionManager does not contain a Region with the name 'LeftRegion'.
Parameter name: regionName
Source=Microsoft.Practices.Prism
ParamName=regionName
StackTrace:
at Microsoft.Practices.Prism.Regions.RegionManagerExtensions.AddToRegion(IRegionManager regionManager, String regionName, Object view)
at PrismOnDXDocking.ExampleModule.ExampleModule.Initialize() in C:\Users\k.wessing\Documents\Samples\DXDocking for WPF\12.1.4\E3339\PrismOnDXDocking.ExampleModule\Module.cs:line 58
at Microsoft.Practices.Prism.Modularity.ModuleInitializer.Initialize(ModuleInfo moduleInfo)
InnerException:
I downloaded this example and tried to run it via your example runner. We are using DXv2 (12.1) and it generates an exception as found by K.Wessing above. I also made sure I was using an up-to-date version of Prism Mef (v4.1):
System.ComponentModel.Composition.CompositionException was unhandled
Message=The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) This RegionManager does not contain a Region with the name 'LeftRegion'.
Parameter name: regionName
Resulting in: An exception occurred while initializing module 'ExampleModule'.
- The exception message was: This RegionManager does not contain a Region with the name 'LeftRegion'.
Parameter name: regionName
- The Assembly that the module was trying to be loaded from was:PrismOnDXDocking.ExampleModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
Resulting in: An exception occurred while calling the 'OnImportsSatisfied' method on type 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager'.
Resulting in: Cannot activate part 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager'.
Element: Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager --> Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager --> AssemblyCatalog (Assembly="Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
Resulting in: Cannot get export 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager")' from part 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager'.
Element: Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager") --> Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager --> AssemblyCatalog (Assembly="Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
Source=System.ComponentModel.Composition
StackTrace:
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T](String contractName)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T]()
at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.InitializeModules()
at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean runWithDefaultConfiguration)
at Microsoft.Practices.Prism.Bootstrapper.Run()
at PrismOnDXDocking.App.OnStartup(StartupEventArgs e) in C:\Users\anielsen\Downloads\DXDocking for WPF\12.1.4\E3339\PrismOnDXDocking\Application.xaml.cs:line 34
at System.Windows.Application.<.ctor>b__1(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at PrismOnDXDocking.App.Main() in C:\Users\anielsen\Downloads\DXDocking for WPF\12.1.4\E3339\PrismOnDXDocking\obj\x86\Debug\Application.g.cs:line 50
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Hello, we have an issue with your sample E3339 (related to the use of regions and adapters). The sample is successfully working with the 11.2.11 version in one of our testing computers. But we’re now integrating the last version of DevExpress (12.1.4) in our sandbox computer and it doesn’t work: the project is compiling but it doesn’t work (the adapters aren’t working: the flow execution isn’t entering in the adapters, in the function Adapt). We’re experiencing the same problem than K.Wessing: System.ArgumentException was unhandled by user code
Message=This RegionManager does not contain a Region with the name 'LeftRegion'.
We have been checking your technical support and it seems there was another issue between the 11.1.x and the 11.2.x, and your teams adapted the sample project for the new DevExpress version. Is it possible that it’s happening the same?
Thanks,
Juan Lopez
I am using the LayoutGroupAdapter
I would like to be able to switch from one view to an other within the same LayoutGroup region.
I 've added the Remove action:
if (e.Action == NotifyCollectionChangedAction.Remove)
{
regionTarget.Items.Clear();
}
Scenario:
in region : <dxd:LayoutGroup cal:RegionManager.RegionName="{x:Static Infrastructure:RegionNames.DetailsRegion}" />
#1 Add a viewA - OK
#2 Remove viewA - OK
#3 Add viewB - OK
#4 Remove viewB - OK
#5 add viewA - Getting ERROR below
Please advice.
Thank you
-
{"Specified element is already the logical child of another element. Disconnect it first."}
-
at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
at System.Windows.FrameworkElement.AddLogicalChild(Object child)
at DevExpress.Xpf.Docking.LayoutPanel.OnControlPropertyChanged(UIElement control, UIElement oldControl)
at DevExpress.Xpf.Docking.LayoutPanel.OnControlChanged(UIElement control, UIElement oldControl)
at DevExpress.Xpf.Docking.LayoutPanel.<.cctor>b__1(DependencyObject dObj, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
...
The Remove event is not handled in the documentgroup adapter which does not reclaim the memory when tab is closed.
Added By: Simon Cui 1 at: 8/12/2013 9:13:37 AMHide the leftregion, the navbar be removed, and hide leftregin again, throw error.
Added By: Sergey Wereteychenko at: 9/3/2013 12:27:27 AMWhy this example is so bugged?
After detaching a panel - disappears a content, please try detach Toolbox...
And why this example craches every time, when attach-detach event happening...
Please, supply Working example.
Added By: Sergey Wereteychenko at: 9/3/2013 12:36:20 AMprivate void OnItemsCollectionChanged(IRegion region, LayoutGroup regionTarget, object sender, NotifyCollectionChangedEventArgs e)
{
if (lockItemsChanged)
{
return;
}
if (e.Action == NotifyCollectionChangedAction.Remove)
{
lockViewsChanged = true;
var lp = (LayoutPanel)e.OldItems[0];
var view = lp.Content;
//lp.Content = null;
region.Remove(view);
lockViewsChanged = false;
}
}
Cause of removing content is "lp.Content = null;" row...
Why was existing this row in example?
Can you complete the code for remove action. We have something as below to remove any tabs that are floating or in the default layout group. it does not find tabs in newly created layout groups.
case NotifyCollectionChangedAction.Remove:
List<DocumentPanel> panelToRemove = new List<DocumentPanel>();
List<FloatGroup> floatGroupToRemove = new List<FloatGroup>();
DockLayoutManager managerRemove = regionTarget.GetDockLayoutManager();
foreach (DocumentPanel panel in regionTarget.Items)
{
foreach (IPanelInfo oldItem in e.OldItems)
{
if (panel.Caption.Equals(oldItem.Title))
{
panelToRemove.Add(panel);
}
}
}
foreach (DocumentPanel pnl in panelToRemove)
{
regionTarget.Items.Remove(pnl);
}
panelToRemove.Clear();
foreach (var floatGroup in managerRemove.FloatGroups)
{
foreach (DocumentPanel panel in floatGroup.Items)
{
foreach (IPanelInfo oldItem in e.OldItems)
{
if (panel.Caption.Equals(oldItem.Title))
{
panelToRemove.Add(panel);
}
}
}
foreach (DocumentPanel pnl in panelToRemove)
{
floatGroup.Items.Remove(pnl);
}
if (floatGroup.Items.Count == 0 )
{
floatGroupToRemove.Add(floatGroup);
}
}
foreach (FloatGroup floatGroup in floatGroupToRemove)
{
managerRemove.FloatGroups.Remove(floatGroup);
}
break;
Added By: Artem Dubenko 2 at: 8/6/2015 12:54:59 PMUnfortunately this example doesn't support selection/activation of the views. A call to IRegion.Activate(view) will have no effect.
Added By: Ivan (DevExpress Support) at: 8/7/2015 6:04:44 AM Hi Artem,I have created a new question on your behalf and posted this question there - How to activate a panel when calling IRegion.Activate. Please refer to my answer in that ticket.Added By: Nelson Peña at: 10/30/2015 9:19:11 AM
There is an error when the Region (TabbedGroup) is unpinned and you try to open a new view in that region.
The situation is that when de TabbedGroup is unpinned also it's removed from the regions in the region manager, so the error is: This RegionManager does not contain a Region with the name 'TabRegion'.
The DockLayoutManager creates an AutoHideGroup and moves all the items from the TabbedGroup unpinned to this new AutoHideGroup but doesn't maintain the relation with the Region.
I'm using the v14.2 version. How is possible to manage this behavior?
How to use the AlertControl in XAF?
See Also:
AlertControl Class
How to: Customize a Template
Question Comments
Added By: MohammedFarooq at: 10/30/2015 4:56:10 PM
Hi There,
Is there any sample code for XAF Web Application?
How to provide the ColorSource property for ColorEdit
This example demonstrates how to provide the ColorSource property for the ColorEdit control to bind ColorEdit to a collection of your custom colors. When the ColorSource property is set to a data source, the new tab with the text specified in the TabName property is created. This custom tab can be hidden by setting the ShowMyCustomColors property to False.
How to export selected appointments to Google Calendar using Google Calendar API
This example illustrates how to export selected appointments to a specific Google Calendar using the Google Calendar API. Google provides the corresponding guidelines regarding the use of this API:
Before using this API, make certain you have read and are in compliance with Google’s licensing terms. Next, you’ll need to generate a corresponding JSON file with credentials to enable the Google Calendar API.
We have a corresponding KB article which contains a step-by-step description of how to generate this JSON file:
How to enable the Google Calendar API to use it in your application
After you generate this JSON file, start the "oauth2callback.aspx" page for authorization.
1. Enter the email address you used to generate the JSON file.
2. Select the JSON file on the client machine by clicking the "Browse" button.
3. Click the "Get 'Client ID' and 'Client secret' from file" button to upload the selected file and enable the Google Calendar API.
4. The application should be navigated to the "Default.aspx" page.
5. Select a corresponding calendar to which the selected appointments are exported from the list.
P.S. To run this example's solution, include the corresponding "Google Calendar API" assemblies into the project.
For this, open the "Package Manager Console" (Tools - NuGet Package Manager) and execute the following command:
Install-Package Google.Apis.Calendar.v3
See Also:
OData service - How to use stored procedures
This example illustrates how to use stored procedures with OData. You can learn how to map an entity to a stored procedure in this blog: Stored Procedures in the Entity Framework. This blog describes how to expose a stored procedure in the OData service: oData and Stored Procedures aka Service Operations. We suggest that you use the DevExtreme WCF OData Service project template when creating the OData service.
To execute a web method of the OData service, use the ODataStore.get method. For example:
[JScript]store.get("TestOperation", { param1: 123, param2: "abc"}).done(...);
Here is a good blog describing how to configure the method so it supports the JSON format: Creating a .NET WCF 4.0 JSON Service.
Question Comments
Added By: Enderson Salas at: 8/25/2014 9:23:07 AM
Can I use this to a stored procedure with a insert?
Added By: Marion (DevExpress Support) at: 8/26/2014 2:26:39 AMHello Enderson,
To process your recent post more efficiently, I created a separate ticket on your behalf: T144008: OData service - How to use a stored procedure to insert data. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
CustOrderHist_Result Where is this defined ? Thanks
Added By: Uriah (DevExpress Support) at: 12/29/2014 12:33:27 AMHello Chandru,
To process your recent post more efficiently, I created a separate ticket on your behalf: T191552: Where is defined CustOrderHist_Result class?. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hi
In below example in dataservice.svc.cs file there is only get method.can u suggest me how to handle update and delete record ?
Added By: Nikolai (DevExpress Support) at: 5/18/2015 1:58:20 AM Hi Kulasekaran,Please refer to the ASP.NET WebAPI vs WCF OData ticket where we discussed a similar issue.Added By: York Leung at: 8/10/2015 11:06:28 AM
Hi,
can you tell me how to do the group on cust-order-hist.dxview dxList by ProductName , how to group the dataSource on cust-order-hist.js?
Added By: Marion (DevExpress Support) at: 8/11/2015 1:17:44 AM@York,
To process your recent post more efficiently, I created a separate ticket on your behalf: T276861: dxList - How to group data. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
I have a question. Do i have to generate manually a cust-order-hist-view-model.js or I can generate automaticly
Added By: Marion (DevExpress Support) at: 11/2/2015 9:52:50 PM@Yoaldis,
To process your recent post more efficiently, I created a separate ticket on your behalf: T307194: OData service - How to use stored procedures - How to create a View. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
How to implement CRUD operations when Entity Framework 5+ is used
This example illustrates how to implement CRUD operations with XtraGrid and EF 5. This approach is also applicable for Entity Framework 6.
To get a possibility to commit changes, it is necessary to store DbContext instance that is used to get the grid's data source. Then when necessary, you can commit changes to the data base using the DbContext.SaveChanges method
Question Comments
Added By: Hassan Gulzar at: 2/1/2015 5:26:37 AM
I'm having issues with this approach. I have a DirType Entity that has many DirParam Entities each. If I bind to grid as mentioned below, I get the desired drilling but in the child view, If I enter a value for any cell and move to another cell, the value disappears. This is not happening on main view but sub views only.
Added By: Nikita (DevExpress Support) at: 2/2/2015 12:32:04 AMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T203624: GridControl - Changes in a detail view's cell are not saved when EF5 is used as a data source. . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
How to modify the appointment editing form for working with custom fields - step by step guide
This example illustrates a technique used to customize an appointment editing form to show custom fields.
See Also:
How to: Modify the Appointment Editing Form for Working with Custom Fields
Question Comments
Added By: Nick Gates 1 at: 1/29/2013 7:37:30 AM
Where is the data source located in this example. It populates when I download and run the example, but I can't find where the actual data table that stores the data is located in the example. I'd like to know that so I can mimic the datafields in my project.
How to use custom ReportParametersObject to filter detail reports ( DetailReportBand )
This example demonstrates how to show a filter dialog that can filter a detail report before showing the report preview. For this purpose, a custom ReportParametersObject - MyReportParametersObject - is created and assigned to the report. This class contains two properties - StartDate and EndDate. They are not used in the MyReportParametersObject.GetCriteria method, because it is required to filter the detail report, not the master one. The filtering is performed in the BeforePrint script of the detail report band (see Script.txt). The MyReportParametersObject is accessed via the XafReport.ReportParametersObject property, and values of its StartDate and EndDate properties are used to create a FilterString for the detail report.
The example uses the legacy Reports Module. The same approach can be used for the Reports V2 Module, but the Report Parameters Object should be created and associated with your report in accordance to the Data Filtering in Reports V2 topic. Also, the object should be accessed in report scripts in a different way - see How to: Access the Report Parameters Object in Report Scripts.
See Also:
Filter Report Data Source via the ParametersObjectType Property
Scripting Overview
How to implement Smart ColumnAutoWidth mode
The XtraGrid provides two built-in column resizing modes: manual and automatic. You can choose one using the GridView.OptionsView.ColumnAutoWidth property. However, in Auto mode the horizontal scrollbar is never enabled. This is a problem if columns are reduced to their minimum width and still don't fit into the view's client area. Also, a column width can be changed only relative to other columns, while manual mode lacks the useful stretching functionality when the control itself is resized.
This example demonstrates how to implement functionality similar to the one provided by ColumnAutoWidth mode and solve its drawbacks in user code.
How to send authenticated requests to the OData service
This example demonstrates how to send authenticated requests to the OData service. The main idea is to handle the ODataContext.beforeSend event and add login information to the header of your request.
See also:
How to process authenticated requests on the OData service
Question Comments
Added By: Phil Jenson at: 1/28/2013 3:12:21 AM
I believe 'beforeSend' function should be a member of the ODataContext and not a member of the CategoryList object.
Added By: Hasan Baidoon at: 7/9/2013 10:33:08 PMHi,
I want to know if this method for Basic Authorization works when JSONP is enabled.
Thanks.
Added By: Onkelinx Ghislain at: 2/13/2014 2:06:23 PMWhich version of visual studio works this example?
Added By: surekha at: 11/3/2015 2:26:49 AMTHis code is not worrking. error comes app not defined. how i can resolve this error.
Added By: Mark Hartmann at: 11/3/2015 2:34:36 AMChange line "app.navigate('Login');" to navigate to your login page according to your other code.
Added By: Nikolai (DevExpress Support) at: 11/3/2015 7:32:12 AM Hi Guys,Surekha, please follow the recommendations from the Mark's comment. If this does not help, describe how we can reproduce the issue with this example. We will do our best to assist you.
How to make a grid column fit all the available space
This example demonstrates how to make a specific grid column fit all the available space of the column headers panel when AutoWidth is disabled regardless of the column visible index.
To enable this functionality, assign the FieldName of a column that should be stretched to the ColumnsLayoutHelper.AutoWidthColumnFieldName property attached to the TableView.
How to generate multi-resource appointments at runtime
Question Comments
Added By: Jean-François Dion 1 at: 11/3/2015 1:34:23 PM
Just take care of the .net type specified in xml ResourceId, that match the type of property corresponding the Id in your object.
Added By: Yulia (DevExpress Support) at: 11/4/2015 5:06:16 AMHello,
The Type property in an XML string that represents Ids of resources associated with an appointment should match the type of the data field mapped to Resource.Id. In this example, a CustomResource business object has the ResID property of the System.Int32 type. So, the Type property should be set to System.Int32.
While researching this subject, I noticed that the data field mapped to the AppointmentMappingInfo.ResourceId property is of the System.Object type. It is recommended to use a data field of the string type to store XML text with information on assigned resources. So, I will update the example accordingly.
Should you have additional questions in this regard, let me know. I will be happy to assist you.
How to: Bind GridControl to DataBase and Implement Master-Detail Mode at Runtime
This example shows how to bind a GridControl to the NorthWind MS Access database and implement master-detail relationships.
The GridControl's master View displays data from the Categories table, while a detail View (CardView) displays data from the Products table. These tables are linked by a master-detail relationship, which is set up in code.
Question Comments
Added By: Daniel Kaminski at: 11/3/2015 9:59:17 AM
This example is not working! Could you please fix it.
Added By: Andrew Ser (DevExpress Support) at: 11/3/2015 11:48:11 PMHello Daniel,
Thank you for your attention. We will fix it soon.
However, you can do this right now on your side. Please open the Project properties, navigate to the Application tab and change Target Framework to 4.0. Then, navigate to the Build tab and change Platform Target to x86.
How to summarize empty cells
The following example demonstrates how to use custom summaries to count the total number of empty cells in a certain grid column.
Question Comments
Added By: Leahs at: 11/4/2015 10:04:17 AM
How can this example of the custom code be used in the view model?
Added By: Michael Ch (DevExpress Support) at: 11/4/2015 9:37:29 PMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T308203: How to summarize empty cells in MVVM. This ticket is currently in our processing queue. Our team will address it as soon as we can.
How to dynamically create a report in an ASP.NET Web Forms application (with a SQL query as a data source)
Description:
I need to implement a generic kind of web report viewer to display the result of my SQL query, which accepts some parameters.
Solution:
This can be done by creating an XRTable control dynamically.
To pass a table name (which is a query parameter), you can use a query string variable. As a result, you can pass the "TableName" parameter as follows:
http://hostname/PassSQLQuery/ReportViewer.aspx?TableName=Customers.
Then, the XtraReport code-behind methods will populate data using the SQL query, which returns all the table rows from the table.
In the final step, an XRTable control is created, and gets bound to the column names of the data table.
Question Comments
Added By: Krishna Raj 1 at: 8/27/2015 12:06:02 AM
I have tried the below sample to my current project using dataset as the binding source but got the blank report at the end.
Added By: Vasily (DevExpress Support) at: 8/27/2015 1:56:13 AMHello Krishna,
To process your recent post more efficiently, I created a separate ticket on your behalf: T282890: How to dynamically create a report in an ASP.NET Web Forms application. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hi ,
i want to deign the report and bind only the values at run time , because it is difficult to align the controls during run time.
is there a way to place the controls during design time and just bind the values at run time in asp.net web application.
Added By: Jannet (DevExpress Support) at: 11/4/2015 11:21:43 PMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T308234: How to place the controls during design time and just bind the values at run time in asp.net web application. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
How to bind ASPxGridView with manually created columns to different data sources at runtime. The grid is created in design mode
This example shows how to select and bind ASPxGridView to a data source at runtime. The page contains ASPxGridView, ASPxRadioButtonList and three data sources (SqlDataSource). In design mode the grid doesn't have any column. You should add all columns manually by using an appropriate algorithm. We have created columns as this is done in selected data columns. If a data source has insert, update or delete command, a command column will be appended to the grid.
Grid's data source is changed by clicking list items. Note that the EnableViewState property is set to false. It is done to avoid exceptions on binding the grid to another data source.
See also:
How to dynamically switch the grid's data source and recreate columns at runtime
How to bind ASPxGridView with autogenerated columns to different data sources at runtime. The grid is created at design mode
How to bind ASPxGridView with autogenerated columns to different data sources at runtime. The grid is created in runtime mode
Question Comments
Added By: Bjorn Padding at: 11/4/2015 11:49:35 AM
I have a XAF application and require the same of what is asked here (https://www.devexpress.com/Support/Center/Question/Details/T216541) by Yasir 9 months ago, to create a timesheet with a UX friendly interface like this one here (https://www.devexpress.com/Support/Center/Attachment/GetAttachmentFile/badaed21-c3f3-11e4-80ba-00155d624807). Even if I would choose to go down this (from a XAF perspective) hackery route of implementing what I want in this application, how would I even seamlessly integrate that under a clickable navigation item in my XAF application? I have tried to approach my problem from several perspectives with my multi-platform knowledge and I have a very hard time coming a acceptable solution. My timesheet reporting tool also has several association to different tables for its projects and users and a bunch of other stuff and this solution would basically make the application error-prone when somebody makes a change to this part of the program, not knowing that he has to modify all kinds of SQL-code in a ASPx page somewhere else. I am even volunteering for the job to write a nice XAF extension for this, but also this seems like it would be a living nightmare to do in comparison to other platforms, like nodejs, for instance, or even PHP or what have you.
As I said. I am willing to volunteer for the task, but then I obviously will need youur help on how to write a nice controller for this that would support both web and win modules.
I hope to hear from somebody.
Best,
B
Hello Bjorn,
To process your recent post more efficiently, I created a separate ticket on your behalf: TimesheetControl (no not SchedulerControl). This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
CheckComboBox Emulation for multiple editors
This example is based on the CheckComboBox Emulation. The main difference is that the java script code can be applied to several ASPxDropDownEdit controls.
Question Comments
Added By: Schazli Kabir at: 11/5/2015 4:27:17 AM
not updating text for combo
Added By: Artem (DevExpress Support) at: 11/5/2015 6:48:53 AMHello Schazli,
To process your recent post more efficiently, I created a separate ticket on your behalf: T308592: E2317 doesn't update text for the editor. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Drag-and-drop data rows from one grid to another
This is an example for the Drag-and-drop data rows from one grid to another Knowledge Base article. Please refer to the article for the explanation.
Question Comments
Added By: Carlos Arias at: 10/9/2012 1:52:58 PM
GridControl grid = sender as GridControl;
grid always null ???
Thanx Dear fro reply me i'll do it
Added By: david ola at: 11/5/2015 5:41:44 AM1. Can you copy instead from the original grid rather than deleting the row being dragged? In other words, after dragging a particular row, let the original grid still have the row, as opposed to the row disappearing.
2. Can you modify the code such that the row being dragged can be captured and displayed, modified before it is dropped?
David,
Just change the DragDrop handler to not import and delete the source and instead create a copy of the DataRow and import that into the second grid.