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

Advanced Banded View Layout with attached behavior

$
0
0

Update:
Starting with version 13.1, we implemented banded grid support out of the box. See the Using Bands to Create Multi-Row Layout article and the E4625 - How to: Create a Banded View example for more information. The solution below applies to versions prior to 13.1.

This example demonstrates how to create the banded view for the DXGrid with the attached behavior.

See Advanced Banded View Layout with attached behavior for more information.

We have included this solution in the DevExpress.Xpf.Grid.v11.2.Extensions library shipped with the 11.2 major version. Refer to the GridDemo.BandedView demo module to see this feature in action.

Question Comments

Added By: Andrew Ferriere at: 4/20/2016 2:53:20 PM    

Hi

I am using ver 11.1.12.
Where can I find the assembly BandedViewExtension ?

Added By: Elliot (DevExpress Support) at: 4/21/2016 3:16:10 AM    

Hello Andrew,

I've created a separate ticket on your behalf (T370323: Where can I find the assembly BandedViewExtension?). It has been placed in our processing queue and will be answered shortly.


Using the ASPxGridView to reorder list items

$
0
0

In this example, the ASPxGridView is used to reorder a list stored in the Session state.
It is possible to move several items simultaneously: select multiple rows using Shift and Ctrl keys and use buttons in the grid's status bar to move selected items up or down.

OBSOLETE - How to show a specific view for some users

$
0
0

In this example it is demonstrated how to show a custom View against a role of the currently logged user. The custom views were created and customized in the Model Editor for each role separately. For more convenience, the custom views have the name of the role in the Id attribute. For instance: Person_ListView_Administrators, Person_DetailView_Administrators, Person_ListView_Guests, Person_DetailView_Guests, etc. You may consider a specific naming convention, for example, to add a role name to the end of the view name.

There is also a controller that tracks showing views in the application and replaces the default view model with a custom view model found in the application model by the role name.

Alternatively, you can handle XafApplication.UserSettingsLoaded event and patch the ViewID attribute of required navigation items under the NavigationItems node as well as the DefaultListView/DefaultDetailView attributes of the BOModel | Class nodes.

Question Comments

Added By: Serkan Dede 1 at: 1/14/2016 10:27:35 AM    

Hi,

I got error in Application_ViewShowing method on line :
e.View.SetModel(modelView);

Error Message:
Cannot change property 'DefaultSorting' when the XPCollection is not in design or initialization mode.

Any idea to resolve this issue?

Added By: Dennis (DevExpress Support) at: 1/15/2016 2:02:00 AM    

Hello Serkan,

To process your recent post more efficiently, I created a separate ticket on your behalf: T334575: The "Cannot change property 'DefaultSorting' when the XPCollection is not in design or initialization mode" error occurs when calling e.View.SetModel(modelView);. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Joel Sanches at: 4/20/2016 11:27:52 AM    This is marked as obsolete. What would be the present recommendation to handle the same scenario in XAF?Added By: Alexey (DevExpress Support) at: 4/21/2016 9:25:16 AM    

Hello Joel ,
I've created a separate ticket on your behalf (T370594: E274 in 15.2). It has been placed in our processing queue and will be answered shortly.

How to bind a control in EditForm template to XPObject enumerable field

$
0
0

The example demonstrates how to use the XPObject with the enumerable field. The field is bound with the ASPxRadioButtonList control that performs conversions from items' values to the "enum" type.
To make the conversion work, the ValueType property should be correctly defined.

How to send authenticated requests to the OData service

$
0
0

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.

The How to process authenticated requests on the OData service example demonstrates how to process requests on the server side.

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 PM    

Hi,

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 PM    

Which version of visual studio works this example?

Added By: surekha at: 11/3/2015 2:26:49 AM    

THis 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 AM    

Change 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.Added By: Luong Tu at: 11/29/2015 6:16:39 PM    

this example  isn't working for me

Added By: MohammedFarooq at: 11/29/2015 9:41:15 PM    

Hi Nikolai,

This example seems to be incomplete as it doesn't have the OData Service project included in it to demonstrate the functionality.

I would appreciate if you can create the ODataService project and demonstrate the example fully.

Added By: Nikolai (DevExpress Support) at: 11/29/2015 11:45:37 PM    Hi Guys,

Please take a closer look at the example description. It contains a link to the required examaple that demonstrates how to process requests on the server side.Added By: saliha mali at: 12/27/2015 7:22:19 AM    

please I'm getting this error
"Error: 'ReferenceError: app is not defined', line 14, file 'http://localhost:64254/views/login.js'"

Can you help me for this?

Added By: Nikolai (DevExpress Support) at: 12/28/2015 1:03:28 AM    

Hello Saliha,

To process your recent post more efficiently, I created a separate ticket on your behalf: T328732: Cannot test the E4460 example due to the "app is not defined" error. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: saliha mali at: 12/29/2015 12:41:55 AM    

It's ok. I prefixed the "app" with the name of my application. Now the error is not displayed. (Guess I get it)
but i'd like to know where should I put the db.js?  Is it in the same folder as "login" and "index" ?
Because I got this error :
"Error: 'TypeError:  TestApp.db is undefined', line 4, file 'http://localhost:54294/views/index.js'."

Added By: Nikolai (DevExpress Support) at: 12/29/2015 1:01:42 AM    Saliha,

You can place the db.js file into any folder. The main requirement is that a reference to this file should be placed before a reference to index.js. 

Added By: saliha mali at: 12/29/2015 1:33:42 PM    

I did not understand what does "db.js" really do?

Here are the sequence of ideas in my head:

1- User enter his (UserName & password) then click LoginButton
2- the index page is shown and it is expected to display a list of categories. The data source of this page is the "CategoryList"

Now I don't understand what is exactly the "categoryList". Is it a table in the DB which is linked to My OdataService?
what do this two lines mean :
key: "CategoryID",
name: "Categories"

So briedfly I need more explanation to make the db.js clear in my head?
thks to help.

Added By: Nikolai (DevExpress Support) at: 12/30/2015 12:36:45 AM    Saliha,

I kindly ask you not to post the same comments in different tickets. Let's discuss this issue in the Cannot test the E4460 example due to the "app is not defined" error ticket.Added By: Şule ışık at: 4/22/2016 12:40:20 AM    Hi,
I try login app. But  I  receiving error. this error is 

Uncaught ReferenceError: Unable to process binding "dxTextBox: function (){return { value:txtUsername} }"
 What is the problem? Added By: Şule ışık at: 4/22/2016 12:59:00 AM     When I wrote "value: anything" , I'm getting error .  Why?

Added By: Nikolai (DevExpress Support) at: 4/22/2016 3:52:42 AM    

Hello Şule,

I've created a separate ticket on your behalf (T370893: The E4460 example throws error). It has been placed in our processing queue and will be answered shortly.

OBSOLETE: How to display an image in GridControl

$
0
0

Starting with version 13.2, GridControl supports displaying images in the Image column out-of-the-box. 


This example demonstrates how to use RepositoryItemPictureEdit to display an image in GridView. The same approach can be used for any View.

Refer to the How to force a GridView to display images against text in specified cells or columns KB article if you want to display both an image and text in a cell.

Question Comments

Added By: Adam Nowicki at: 7/13/2014 3:00:14 AM    

The solution works well. The problem is filtering through AutoFilterRow and sorting. In the column with image is written "No image data" and you can not use a filter. Please solution how applied in this case AutoFilterRow and sorting to this column.

Added By: Alexey Z (DevExpress Support) at: 7/14/2014 12:23:32 AM    Hello,

In order not to mix several questions within one thread, I will extract your question to a new ticket. Let us continue our discussion there How to use the AutoFilterRow feature with the column with PictureEdit as its in-place editor.Added By: Jim Buckley Barrett at: 10/28/2014 12:28:37 PM    

how would you set the size of the image in the grid without changing to layout view?

Added By: Alexey Z (DevExpress Support) at: 10/29/2014 12:59:31 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T166680: GrudControl - How to set the size of the image in the grid without changing to layout view. Let's continue our discussion there.

Added By: Stefan Kloss at: 4/22/2016 2:19:12 AM    Sorry, I do not understand, mabye I want something different.

It MUST be very easy. With a MS DataGridView it IS easy.

I want to DISPLAY not edit, not select or other, simply read only display of a programmatically chosen Image in one column, every Row/Cell has it's own image. What is to do?

In a DataGridView I use the CellFormatting - Event, check if the image Column is the current one, get the item bound to the Row, use the data to select an image and set the Cell-Value (e.Value = selectedImage).

What is it in a dx GridControl?
I cannot event change the column-Type to some kind of "Image"-Column.
how does that work at desgn time?

The column is unbound (and I'm not using a DataSource), I do not want to use ImageLists, ....
Your Example is incomplete.

Added By: Nadezhda (DevExpress Support) at: 4/22/2016 3:13:48 AM    

Hello,

I've created a separate ticket on your behalf (How to show image in an unbound column). It has been placed in our processing queue and will be answered shortly.

GridControl - How to implement odd and even appearance for rows with the same values

$
0
0

This example illustrates how to customize the appearance of rows containing the same values in the key column by using the GridView's RowStyle event.
The value in a cell of the previous row is used to determine whether it is necessary to customize the appearance of the currently processed row.

How to manage the selection in ASPxGridLookup depending on one of the items selected

$
0
0

This example illustrates a scenario, in which one item in the GridLookup drop-down list "includes" all others. If this item is selected, all other items should be unselected. This is achieved using the client-side SelectionChanged event of the drop-down ASPxGridView.

See also:
ASPxDropDownEdit - CheckComboBox Emulation

Question Comments

Added By: Santhi at: 4/22/2016 7:55:13 AM    Thank you very much, Exactly what we wanted ! 

How to print a report without displaying it in a web application

$
0
0

This example illustrates the approach of printing report document directly, via Adobe PDF web browser plug-in.
This can be done by sending the exported XtraReport document via the Page.Response.OutputStream.Write method, and setting the PdfExportOptions.ShowPrintDialogOnOpen property to True.

See also:
How to print/export XtraReport in an ASP.NET application without showing a report preview

Question Comments

Added By: M Abo Habiba at: 8/28/2013 2:08:29 PM    

can i print it without export to pdf ?

Added By: Alex (DevExpress Support) at: 8/29/2013 2:54:42 AM    

Hi,

The direct printing approach is not supported in a Web application because the web server does not have direct access to the printer installed on the client's machine.

Added By: M Abo Habiba at: 9/2/2013 12:38:48 PM    

I face a problem when i try to print using pdf (Arabic Unicode)
i tried to print it using java script but when page load it show the print dialog before report displayed can detect after print in java script or any way else
thanx

Added By: Alex (DevExpress Support) at: 9/3/2013 1:29:36 AM    

Hi,

If possible, create a separate ticket in Support Center and provide your test application for further examination. We will check for a suitable solution.

Added By: FSzymanska at: 3/5/2014 3:34:09 AM    

Hi,

I have run your example. Everything works fine when English chars are used. But when I put poloish chars like 'ś' , ć' in the report content thay are printed badly. Looks like problem with encoding. Can you please help me?

Added By: M Abo Habiba at: 4/24/2016 9:19:51 AM    i used this example to print put it's appear look like pdf viewer in browser 

GridControl - How to implement events for custom printing cells and headers

$
0
0

This is an example of a GridControl that has two custom events. These events can be used for custom drawing cells and headers in PrintPreview.
The MyGridViewPrintInfo class inherits from the GridViewPrintInfo and contains overridden methods: 
1) PrintRowCell - for raising events for custom drawing cells;
2) PrintHeader - for raising events for custom drawing headers.

How to sum values of bound and unbound columns and calculate a total value on the client side

$
0
0

This example shows how to sum values in two columns. One of them is a bound to a data source column. The other one contains ASPxSpinEditor fields, in which any numeric value can be typed. Results are shown in the 'Total' column. Also, in the footer of this column, the total sum of all its values is displayed.
All calculations are performed on the client side. Calculated values aren't stored in the data source. If you want to save your changes, we suggest you review How to perform ASPxGridView instant updating using different editors in the DataItem template for details

Question Comments

Added By: Sureshma Reddy at: 4/25/2016 12:37:57 AM    In this example I want to add Totalsummery for Count column and Unitprice.
where Unitprice is having empty values which is given manually.So finally I want to change Count and I will give Unitprice so that the resultwill calculated as Totalcount,Total Unitprice and Total.
where Totalcount,Total Unitprice and Total should be AspxSummeryItems.
How to accomplish this Task..??
Thanks in advance.
Added By: Artem (DevExpress Support) at: 4/25/2016 1:23:41 AM    

Hello,

Thanks for contacting us. I've created a separate ticket on your behalf (T371394: How to calculate total values on the client side). It has been placed in our processing queue and will be answered shortly.

How to: Implement Custom Context Navigation

$
0
0

This example illustrates how to implement custom context navigation. The complete description is available in the How to: Implement Custom Context Navigation help topic.

Question Comments

Added By: Max Reimann at: 4/25/2016 1:38:30 AM    When i run your example it only updates his Navigationitems after restart 
so it would be nice if you upgrade you sample with the answer from

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

to improve this good example to make it even better :-)

Added By: Konstantin B (DevExpress) at: 4/25/2016 3:02:32 AM    

Hello Max,

The solution from Q214127 is not suitable for all possible scenarios. For instance, there is no ShowNavigationItemController in the current Frame when the MDI mode is enabled, so the NullReferenceException will be thrown. Instead, you can use the following code:

[C#]
Application.MainWindow.GetController<ShowNavigationItemController>().RecreateNavigationItems();

  Another drawback is that focus is lost when calling the RecreateNavigationItems method. This behavior may be inappropriate in certain scenarios, and a separate RefreshNavidation Action will be required. So, we decided not to complicate the current example, as its goal is just to demonstrate how to create navigation items in code. You can choose any appropriate refresh method.

How to implement excel style tree filtering in a filter popup

$
0
0

This example demonstrates how to filter dates using a tree and select date ranges.

How to determine a name of an UI command executed in RichEditControl in response to a user action

$
0
0

In some cases, a default command should be extended with custom logic to implement additional functionality or customize existing functionality. If so, the first part of the task is to find which command should be overridden. The easiest way to achieve the goal is to listen to which commands are executed in the RichEditControl in response to a certain action. The XtraRichEdit Suite provides the CommandExecutionListenerService service for notifications. This example demonstrates how to create a custom CommandExecutionListenerService service to check which UI command is being executed at the moment.

How to add spell checking capabilities into an XAF application for Windows and the Web

$
0
0

Scenario
This example demonstrates how to integrate WinForms SpellChecker and ASP.NET WebForms ASPxSpellChecker components in XAF. These utilities provide a straightforward way in which to add Microsoft® Office® style spell checking capabilities into your Windows and Web applications and offer you built in suggestion forms that replicate corresponding forms found in Microsoft Outlook.


Note: this is not a complete solution by any means, but just an example that demonstrates certain integration scenarios to help you implement a spell checking functionality in your end application. There may be issues, so feel free to research, test and modify the source code of these modules to better meet your business needs. We look forward to any feedback on these modules if you find issues or have further suggestions.

Steps to implement
1.
 Here you can download the improved implementation, which is recommended for use with the latest XAF versions (the old example versions for <= v12.2 are still available below). This attachment contains three custom XAF extra modules  + a small demo project to help you check what is done and how this works.
2. Copy and include the DevExpress.ExpressApp.SpellChecker, DevExpress.ExpressApp.SpellChecker.Win and DevExpress.ExpressApp.SpellChecker.Web projects into your own XAF solution and build it;
3. Invoke the Application Designer for your executable WinForms project (YourSolutionName.Win) or the Module Designer for your WinForms module project (YourSolutionName.Module.Win) and open the Toolbox (Control+Alt+X) to drag the SpellCheckerWindowsFormsModule item from the Toolbox;
4. Invoke the Application Designer for your executable ASP.NET WebForms project (YourSolutionName.Web) or the Module Designer for your ASP.NET WebForms module project (YourSolutionName.Module.Web) and open the Toolbox (Control+Alt+X) to drag the SpellCheckerAspNetModule item from the Toolbox;
5. Copy the Dictionaries folder from the attachment (see under the Demo.Win folder) into your executable WinForms project (YourSolutionName.Win) and ASP.NET WebForms project (YourSolutionName.Web) projects.
6. Run the Model Editor for YourSolutionName.Win/Model.XAFML file and adjust required settings under the Options | SpellChecker node.


Important notes
1. If you are using RichEditControl, check out the Adding Richedit to Sample E736 thread for additional configuration.
2. Our XtraSpellChecker Suite does not currently support the standard System.Windows.Forms.WebBrowser component (learn more...) reused in the Design tab of our WinForms HtmlPropertyEditor. So, spell checking works fine only in the Html tab where the MemoEdit control is used.
3. A VB.NET version is not planned due to the implementation and maintenance complexity, so you can either use this approach OR convert this code from the attachment into your language using free tools found on the Web.

Question Comments

Added By: Louis Z at: 5/15/2014 8:04:47 AM    

1. Copy the Spelling.Win project into your solution and build it;
2. Invoke the Application Designer for your executable project and open the Toolbox (Control+Alt+X);
3. Drag the SpellingWindowsFormsModule item from the Toolbox;
4. Build and run your project.

Added By: Tony Tadros at: 1/15/2015 9:53:11 AM    

Hello Devexpress ,this example is not working anymore ,do you have any update

Added By: Dennis (DevExpress Support) at: 1/16/2015 8:27:34 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T197752: SpellChecker integration in XAF 14.2. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.



Added By: Luke Kenyon 1 at: 9/24/2015 12:39:10 AM    

Hi, I just downloaded this and applied it to my project after converting the projects to the latest version. I did notice that it has added 2 button items to the menu for spell checking other than that it does the job which has saved me some time thanks.
Cheers Luke

Added By: Dennis (DevExpress Support) at: 9/24/2015 3:16:16 AM    @Luke: Thanks for taking your time to test this solution in your project and share your feedback with us. This module also adds a corresponding button in the toolbar for checking the whole form.Added By: Hein Kramer at: 4/13/2016 1:28:22 AM    Hi, we used the example from Dennis in our XAF project and worked great! Now after upgrading to DX 15.2.9 the following error occures after closing a view.

System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.   bij DevExpress.XtraSpellChecker.Native.FormFocusSpy.CanCheckControl(Control control)   bij DevExpress.XtraSpellChecker.Native.FormFocusSpy.ProcessContainerControlsRecursive(Control container, IControlVisitor visitor)   bij DevExpress.XtraSpellChecker.Native.FormFocusSpy.OnContainerDisposed(Object sender, EventArgs e)   bij System.EventHandler.Invoke(Object sender, EventArgs e)   bij System.ComponentModel.Component.Dispose(Boolean disposing)   bij System.Windows.Forms.Control.Dispose(Boolean disposing)   bij System.Windows.Forms.Form.Dispose(Boolean disposing)   bij DevExpress.XtraEditors.XtraForm.Dispose(Boolean disposing)   bij DevExpress.ExpressApp.Win.Templates.XtraFormTemplateBase.Dispose(Boolean disposing)   bij System.ComponentModel.Component.Dispose()   bij DevExpress.XtraBars.Docking2010.Views.BaseDocument.ReleaseControl()   bij DevExpress.XtraBars.Docking2010.Views.BaseDocument.OnDispose()   bij DevExpress.XtraBars.Docking2010.Views.Tabbed.Document.OnDispose()   bij DevExpress.XtraBars.Docking2010.Base.BaseComponent.Dispose(Boolean disposing)   bij System.ComponentModel.Component.Dispose()   bij System.ComponentModel.Container.Dispose(Boolean disposing)   bij System.ComponentModel.Container.Dispose()   bij DevExpress.ExpressApp.Win.Templates.MainForm.Dispose(Boolean disposing)   bij System.Windows.Forms.Form.WmClose(Message& m)   bij DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)   bij DevExpress.ExpressApp.Win.Templates.XtraFormTemplateBase.WndProc(Message& msg)   bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Now I disabled the Dispose action in ReleaseSpellChecker() to prevent this error.
But this is a work-around and not a solution. 

private void ReleaseSpellChecker() {            if(SpellCheckerComponent is IDisposable) {                ((IDisposable)SpellCheckerComponent).Dispose();                SpellCheckerComponent = null;            }        }
It seems to be that some events changed in the DevExpress.XtraSpellChecker.SpellChecker and the internally used FormSpy infecting the dispose events...
Added By: Dennis (DevExpress Support) at: 4/13/2016 7:44:40 AM    

@Hein Kramer: I've created a separate ticket on your behalf (T367447: NullReferenceException may occur at DevExpress.XtraSpellChecker.Native.FormFocusSpy.CanCheckControl(Control control)). It has been placed in our processing queue and will be answered shortly.


How to create fully custom Role, User, Event, Resource classes for use with the Security (old) and Scheduler modules

$
0
0

This example demonstrates how to create fully custom classes for use in our Security Module (with the 'old' DevExpress.ExpressApp.Security.SecurityComplex component) and Schedule Module:
    - Activity is an analog of our standard Event class that is used to represent appointments in the Scheduler Control.
    - Employee is an analog of the standard User class, which also supports the IResource interface to use objects of this class as resources in our custom appointment above.
    - Group is an analog of our standard Role class
To enable these two custom security classes in your application set the RoleType and UserType properties for the SecurityComplex component within the Application Designer.

Additionally, the two popular filtering tasks are implemented: filtering appointments by the current logged employee and also filtering resources to show only those owned by the current logged employee.
This functionality is provided by the SchedulerActivityListViewControllerBase class and its descendants as follows:
   a. Administrator account (Sam, to log on, leave the Password field empty) sees all the resources and appointments in the root scheduler view.
   b. Non-Administrator account (John, to log on, leave the Password field empty) sees only his own resources and appointments in the root scheduler view.
   c. Both Administrator and Non-Administrator accounts see their own resources and appointments in the nested scheduler view.
You can use SchedulerActivityListViewControllerBase  and related controllers for study purposes, since they demonstrate the most common filtering scenarios in the scheduler view. If you do not need all this specific functionality, simply remove these controllers and create your own ones (perhaps based on the provided example code) that will do only your specific task. For example, the controllers from this example are not suitable in the nested scheduler view because you miss some part of the default Link/Unlink functionality since the scheduler view is always filtered to show only its own resources and appointments.That may not be desired because you may want to have the capability to link appointments from other resources, but they won't be shown due to the above. Plus, these demo controllers are unnecessary for appointments filtering in the nested scheduler view, because by default, in this view only appointments from the current resources are shown.

Important notes

1. Example implementations are NOT designed for the 'new' security system components and scenarios (e.g., middle-tier application server or SecuredObjectSpaceProvider). To use the SecurityStrategyComplex component, provide fully custom implementations of the user and role classes as per the eXpressApp Framework > Task-Based Help > How to: Implement a Custom Security System User Based on an Existing Business Class article.

2. The Activity (appointment) and Employee (resource) classes' code was once created based on the code of the default Event and Resource classes from our DevExpress.Persistent.BaseImpl library. It is necessary to update their code based on the source ...\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl\ library sources according to changes made in the latest XAF versions.

Question Comments

Added By: Ad de Rijke at: 5/19/2014 4:52:28 AM    

The Web project does not compile: 'The type or namespace name 'WinWebSolutionAspNetApplication' could not be found (are you missing a using directive or an assembly reference?)'

Added By: Dennis (DevExpress Support) at: 5/20/2014 3:31:16 AM    @Ad: For some reason the WebApplication.cs file was emptied. I have attached a working sample for your reference. I will also update this example as well.Added By: Ville Virtanen at: 12/4/2015 11:06:39 PM    

When trying to run it gives an error: Another rule with ID = 'EventIntervalValid' already exists.

When I commented following lines, it worked, but how I disable the BaseImpl rule?

//[NonPersistent]
       //[Browsable(false)]
       //[RuleFromBoolProperty("EventIntervalValid", DefaultContexts.Save, "The start date must be less than the end date", SkipNullOrEmptyValues = false, UsedProperties = "StartOn, EndOn")]
       //public bool IsIntervalValid { get { return StartOn <= EndOn; } }

Added By: Dennis (DevExpress Support) at: 12/7/2015 5:41:37 AM    

@Ville: You can simply rename this rule without commenting it out to avoid this error. Or, you would better not to use the default Event class from the DevExpress.Persistent.BaseImpl library in your project.

Added By: Nate Laff at: 2/17/2016 7:43:43 AM    Can we see an update to this for 15.2? Things are currently pretty broken. In Activity.UpdateEmployees() the XML is coming back much different than it previously did.Added By: Dennis (DevExpress Support) at: 2/17/2016 8:09:23 AM    

@Nate: We will unlikely update this code for v15.2 for the reasons described in point #2 of the important notes to this example. The example's Activity class code is pretty much the same as the code of the Event class (similarly, Employee is an analog of the Event's Resource and security User classes) and we would like to avoid synchronization and maintenance problems for our users going forward.

In the future, I will probably rework this article to be more like a codeless KB article that would focus not on specific implementations, which are different for each concrete business scenario, but rather on the main points of such an integration, which are the same for all cases. I hope this makes sense.

dxChart - How to convert a chart SVG presentation to an image using canvas

$
0
0

This example illustrates how to obtain SVG presentation from a chart and convert it to an image using the canvas element.

Question Comments

Added By: Egor Gorchakov at: 4/26/2016 5:52:59 AM    Hi.

Example not working on IE and Edge.

MVCxWebDocumentViewer: How to use WebDocumentViewer within a DevExtreme application

How to replace a default SchedulerControl's command with a custom one

$
0
0

This example illustrates the technique used to modify the functionality of existing SchedulerControl commands.
The SchedulerControl exposes the ISchedulerCommandFactoryService interface that enables you to substitute the default command with your own custom command. 

First, create a custom command class inherited from the command that you wish to replace. Override the required methods of the command. Then, create a class that implements the ISchedulerCommandFactoryService interface. In this class, you need to implement the CreateCommand method to create an instance of a custom command class. An identifier of the currently processed command is passed as a parameter of this method.

Finally, use the custom class that implements the ISchedulerCommandFactoryService interface to substitute the default command service. In this case, instead of the default command, the command you implemented will be used by the SchedulerControl.

For demonstration purposes, the default SplitAppointmentOperationCommand command is replaced with a custom command in this example. The default SplitAppointmentOperationCommand command is extended with the SplitAppointmentCommandStep property to define a fixed split operation's step.

How to access a tab control in a Detail View layout

$
0
0

Scenario
This example demonstrates how to implement a View Controller that will access layout controls and customize them as required. In particular, the second tab in the tab control should become active when opening the detail form.

Steps to implement

1. This functionality is implemented in the WinCustomizeTabControlViewController and WebCustomizeTabControlViewController classes that are added into the WinForms and ASP.NET module projects respectively (copy these classes into the respective projects of your test solution).

2. Take special note that to identify the layout element, we look at its identifier, which is specified in the Model.DesignedDiffs.xafml file of the platform-agnostic module.

See also:
eXpressApp Framework > Concepts > UI Construction > View Items Layout

Question Comments

Added By: Wieland Voß at: 4/26/2016 11:30:50 PM    Hi all.

Do you have a hint for me, how to determine the index of the active tab?
And moreover, how to determine the index of a particular tab (i. e. by name)?

I want to switch to the "totals" tab, only if the "particulars" tab is the active one.

Best regards,
Wieland

Added By: Dennis (DevExpress Support) at: 4/26/2016 11:37:37 PM    

@Wieland: I've created a separate ticket on your behalf (T372263: how to determine the index of the active tab?). It has been placed in our processing queue and will be answered shortly. Please specify your target platform in that new ticket as well (WinForms/Web).

Viewing all 7205 articles
Browse latest View live


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