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

How to customize the integrated ribbon for the WPF Spreadsheet


How to display the Stacked Bar total value labels

WinForms End-User Designer - How to implement a Control Template Gallery to provide the capability to create reusable control sets

$
0
0
This example demonstrates how to add the capability to save selected controls and reuse them in this or other reports like UserControls in standard Windows Forms applications. Starting with the version 17.1, the Report Gallery is available in WinForms End-User Report Designer out of the box, so writing any code is no longer required to implement this functionality.

Implementation Details:
In the scope of this example, we add a custom End-User Designer DockPanel and fill it from the predefined storage (if this storage is not empty), which can be passed to the constructor or Storage property of a custom ReportDesignTool descendant. The storage should implement the IControlTemplateStorage interface, which declares the following members:

- GetCategoryNames. This method should return string representations of all template categories in your storage.
- GetTemplateNamesForCategory. This method returns template names for the specified category.
- GetData. This method returns a byte array containing stored controls.
- SetData. This method allows you to save a byte array representing saved controls.
- DeleteTemplate. Use this method to delete the specified template from your storage.
- DeleteCategory. Use this method to delete the specified category and inner templates.

In this Code example, you can find two sample implementations of this interface. The first one (ControlTemplateStorage) demonstrates how to create an in-memory storage, and the second one uses a DataSet instance for storing templates.

UI for Template Gallery:
As stated above, we added a custom Dock Panel that has two buttons (Add and Delete) for operating with templates and a TreeList instance that displays existing categories and templates. To create a new template, select the required controls in your report and click the Add button. You will see a new dialog requesting the Category and Template name.

To create controls from a template, select the required template in the TreeList and drag-and-drop it to a report design surface at the required location.

To delete a template or category, select it in the TreeList and click the Delete button.

How to: Implement a Custom Geocode Provider

$
0
0
This example demonstrates how to create a custom Geocode provider.

How to assign different in-place editors to different types of cells

$
0
0

The following code shows how to handle the PivotGridControl.CustomCellEdit event to assign different in-place editors to different types of cells.

In the example, two in-place editors (repository items) are created to represent values of the "Quantity %" field. The ProgressBar editor is used to represent regular cell values, while the SpinEdit editor is used to represent total values for this field.

How to override the cell editor used for the in-place editing

$
0
0

The following code shows how to handle the PivotGridControl.CustomCellEditForEditing event to override the cell editor used for the in-place editing.

In the example, the ProgressBar in-place editor (repository item) is created to represent values of the "Quantity %" field. In the edit mode, this repository item is changed to TextEdit.

XL Export API - Examples

$
0
0

This example demonstrates how to use the XL Export API to create spreadsheet files in XLSX, XLS and CSV formats.

This project introduces API properties and methods used to perform the following operations:
- Create a workbook, worksheets, rows, columns and particular cells
- Apply predefined, themed and custom formatting to worksheet cells
- Apply conditional formatting rules
- Enable filtering and group data
- Apply data validation rules
- Assign formulas to worksheet cells
- Specify page settings
- Specify print options
- Insert pictures
- Insert hyperlinks
- Specify document properties

Starting from v2015 vol.2:
- Insert and modify sparklines
- Apply different fonts to specific text regions within a cell
- Create image hyperlinks
- Display a worksheet from right to left

Starting from v2016 vol.1:
- Create a table
- Apply a table style to a table
- Format the table elements
- Total data in a table
- Create calculated columns

Starting from v2017 vol.1:
- Password protect a document
- Filter the data by a list of values
- Apply a number filter
- Apply a date filter
- Apply a dynamic filter
- Apply a Top 10 filter
- Filter by a fill color

Question Comments

Added By: Piotr (The Timken Company) at: 12/21/2015 11:34:23 PM    

Hi
This project not compatible with version VS 2010 pro
Piotr

Added By: George (DevExpress Support) at: 12/22/2015 12:55:53 AM    Hi,

Thank you for your message!
We will update this example as soon as possible. Please bear with us.Added By: George (DevExpress Support) at: 12/22/2015 1:01:58 AM    

Hi,

I've updated this example, so now it is available for the Visual Studio 2010 application.
If you need further assistance, let me know.

Added By: Piotr (The Timken Company) at: 12/22/2015 1:25:38 AM    

Thx

Added By: Piotr (The Timken Company) at: 12/22/2015 1:27:11 AM    

Still example not working in VS 2010

Added By: Piotr (The Timken Company) at: 12/22/2015 1:29:48 AM    

See attached screen
Ups; I do not add attach

Added By: George (DevExpress Support) at: 12/22/2015 2:26:34 AM    Hi,

It seems that there was some internal technical problem. I've tested it again and now it is working correctly. Please try to download this example once more time and let us know your results.
I look forward to your response.

Web Dashboard - How to save a dashboard state to cookies and restore this state on the server side

$
0
0

The sample illustrates how to save the current ASPxDashboard 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.
- In the ASPxDashboard.SetInitialDashboardState event handler, the dashboard state is loaded from the cookies and applied to a dashboard.


How to group GridControl by multiple values [the Multi Value Grouping demo]

$
0
0
This example contains the corresponding demo from our Demo Center version 16.2 and lower. It emulates the MS Outlook grouping feature, where tasks can belong to multiple categories.

How to: generate series in the MVVM-style

$
0
0
This example demonstrates how to create series by their view-models.

How to: Pass parameters to a web report using the ASPxWebDocumentViewer control

$
0
0

This example illustrates how to pass parameters to a web report using the ASPxWebDocumentViewer control.

Question Comments

Added By: Eric Brooksby at: 11/13/2013 4:48:04 PM    

About as usefull as a third tit

Added By: IT Dept_ at: 5/18/2017 6:10:29 AM    I was redirected HERE when looking for a solution to pass a URL query to an ASPxWebDocumentViewer parameter. There's nothing here.

Web Dashboard - How to specify a dashboard state manually in code

$
0
0
The sample illustrates how to specify a dashboard state (such as master filter or parameter values) in code and how to apply this state when loading a dashboard for the first time. In this example, the DashboardState object holds the required dashboard state. The ASPxDashboard.SetInitialDashboardState event is used to apply the specified dashboard state when loading a dashboard.

How to validate the ObjectDataSource contained in the Spreadsheet MailMerge template

$
0
0
This example illustrates how to use the SpreadsheetControl.Options.DataSourceOptions property and a custom service that implements the IObjectDataSourceValidationService interface to validate an ObjectDataSource contained in the loaded mail merge template and prevent the data source from loading.
Click Load Template to load mail merge template with object data source. Check the Custom Validation Service checkbox to replace a default service with a custom implementation which silently prohibits data loading.




Document Server - How to validate the ObjectDataSource contained in the Spreadsheet mail merge template

How to: Implement a Custom Route Provider

$
0
0
This example demonstrates how create a custom route provider and use it to calculate a route between two geographical points.

How to validate the ObjectDataSource contained in the Snap document

$
0
0
This example illustrates how to use the SnapControl.Options.DataSourceOptions property and a custom service that implements the IObjectDataSourceValidationService interface to validate an ObjectDataSource contained in the loaded document and prevent the data source from loading.
Click Load Template to load mail merge template with object data source. Select the DocumentLoadingBehavior value combo to specify whether to call a service to prompt the user. Check the Custom Validation Service checkbox to replace a default service with a custom implementation which silently prohibits data loading.



How to: Implement a Custom Search Provider

$
0
0
This example demonstrates how to create a custom search provider.

Mapping Converters - an example of use

$
0
0
This example demonstrates mapping converters which allow you to apply custom logic to mappings
With mapping converters you can easily change the format in which the data are stored or perform  additional actions when data are stored or retrieved.

How to create a custom GridControl that represents columns horizontally in a way similar to the WinForms VerticalGrid control

$
0
0

This example demonstrates how to create a GridControl descendant with horizontally oriented columns.

To use it, simply add the VerticalGridControl.xaml and VerticalGridControl.xaml.cs files in your project.

In addition, this example demonstrates how to customize grid cells using data templates.

Question Comments

Added By: Prashant Patel 7 at: 5/8/2013 11:44:19 PM    

How can we View Stackpanel as fullscreen mode in wpf window ?

Added By: AKN at: 12/12/2013 12:01:51 PM    

Hi, is there any way of showing TotalSummary in this control?

Added By: Chris Schiefer at: 7/18/2014 7:44:04 AM    

When I updated to v2014 vol 1.5, the event for CustomUnboundColumnData is never fired and the cells never present any data.  It looks like the grid is displaying the correct number of rows and columns, but the data isn't populated.

Added By: Michael Ch (DevExpress Support) at: 7/18/2014 11:41:47 AM    

Hello,

To process your recent post more efficiently, we copied it to a separate ticket created on your behalf: T131266: The E4630 example doesn't work correctly after updating to v2014 vol 1.5.
This ticket is currently in our processing queue. We will post to it as soon as we have any updates.

Added By: AQAN at: 8/4/2016 10:48:28 AM    Hi, Is this supposed to show you row labels? First row is date but what if I wanted to show the label "Birth Date" as a row label in the first column of the grid. is that doable?Added By: Michael Ch (DevExpress Support) at: 8/4/2016 11:56:22 AM    

Hello,

I've created a separate ticket on your behalf (T411462: How to show row labels). It has been placed in our processing queue and will be answered shortly.

Added By: Edgar Duee at: 5/19/2017 3:10:01 AM    This is an extremely useful example, that works well, and I have adapted it to work with a DataTable.
However, there is a problem with the LightGray theme - when Office2016White is changed to LightGray, the row headers are not seen.
How might this be fixed?
Thanks.

How to save callback state in the Session object

$
0
0

The ASPxPivotGrid stores its intermediate state in a hidden CallbackState field. In some cases, especially when the ASPxPivotGrid is connected to a large OLAP cube, this state can have a significant size. If the CallbackState field affects your web application performance, you can store it in the Session object or a static variable. You can use the ASPxPivotGrid.CustomLoadCallbackState and ASPxPivotGrid.CustomSaveCallbackState  events to implement a custom saving / loading mechanism. This example demonstrates how to do this.

Viewing all 7205 articles
Browse latest View live


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