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

Getting Started - Lesson 3 - Using Series Template for Auto-Created Series

$
0
0

This lesson demonstrates how to add a series template to a chart's diagram, and then automatically bind this template to a datasource.

Note that although in this tutorial we will use the Microsoft Access database (.mdb), the ChartControl can be bound to a variety of other data providers. For more information on data binding, refer to the Providing Data section.




How to filter a collection by an associated objects' properties

$
0
0

This example demonstrates how to filter a collection of parent objects (Customers) by a specific value which must exist in child collections (Orders) of each parent (Customer). Please refer to the A2394 article for details. This example fetches data from the Northwind demo database on a local SQL Server.

Using Mail Merge - a simple example

$
0
0

This simple example illustrates a mail merge in the XtraRichEdit. The tab control on the form contains two RichEdit controls and ribbon UI. One RichEdit control is used to construct a template, the other displays the merge result.
The data source used to supply merged data is the ArrayList generated at runtime.

How to align summary values displayed in a group row to the corresponding columns

$
0
0

This is an example for the A1041 Knowledge Base article. Please refer to the article for the explanation. This example was updated to prevent overlapping of a summary text with the group row text when the first column width is reduced.

See also: How to print group summary values under corresponding columns.

Example Comments

Added By: Ken Yanovsky at: 6/5/2013 4:55:59 PM    

In this example using item.GetDisplayText(values[item], false) from the GridGroupSummaryItem is brutally slow as internally it's doing a try/catch.

Unless that's fixed, it's a lot quicker to use the column's editor GetDisplayText method like so
view.Columns[item.FieldName].RealColumnEdit.GetDisplayText(values[item])

Added By: Tony T1 at: 7/31/2013 1:41:50 PM    

I used this example to set my summaries as well as to allowing me to paint the background color of specific grouped rows that were set in the gridView1_CustomDrawGroupRow event (I set the e.Appearance.BackColor which was then painted on with the Painter object). However I was not able to match the color of the row to the indent on the group level.

 Is there anyway to do this?

Added By: Tony Tam 1 at: 9/12/2013 9:24:05 AM    

Also these changes dont print out

ASPxTreeView - How to change the height of the node

How to export a grid column with an image in its caption

$
0
0

This example demonstrates how to create a GridControl descendant which allows exporting columns with an icon in its header. To accomplish this task, it is necessary to override the PrintHeader method in the custom GridViewPrintInfo class.

Note: GridControl does not export images (include the column headers images) to Excel for performance reason. Refer to the https://community.devexpress.com/blogs/ctodx/archive/2011/04/05/sneak-peek-improving-the-performance-and-memory-footprint-of-excel-and-pdf-export-from-winforms-grid-coming-in-v2011-1.aspx blog for details.

DXCharts Getting Started - Lesson 1 - Create a Simple Chart

$
0
0

This example demonstrates how to create a simple chart, populate it with data and adjust its common settings.

ASPxGridView - Multi-Row Editing

$
0
0

This demo shows how to edit all rows selected on the page.

See Also:
Custom client-side logic implementation in the grid with multi-row editing
How to implement the multi-row editing feature in the ASPxGridView
How to edit multiple selected rows in a single Edit Form
How to perform ASPxGridView instant updating using different editors in the DataItem template
How to implement ASPxGridView Multi-Row editing using ASPxHiddenField in the Master-Detail scenario

Example Comments

Added By: Angela Pearman at: 1/11/2013 12:50:49 PM    

Why are there two InvoiceItems.vb files in this example?

Added By: Scott Harding at: 6/1/2013 7:27:13 PM    

Doesn't maintain edit values if you click the header to sort the grid in edit mode.

Added By: Prashanthi G at: 7/17/2013 10:26:45 AM    

This is working fine with Text and memo columns but Not working with GridViewDataComboBoxColumn - not updating combobox values- please advise

Added By: Prashanthi G at: 9/8/2013 6:39:04 AM    

How to achieve the same when grouping the columns?, this example not working properly when grouping is there in the grid. when expanding and collapsing the rows, the visible indexes changing hence the values entered are wrongly placing in the gird.

How to get exact row index when grouping also?


DXCharts Getting Started - Lesson 2 - Bind Chart Series to Data

$
0
0

This example demonstrates how to manually add a series to the chart's diagram, and then bind this series to the datasource.

How to provide custom names for the Field List data items

$
0
0

This example demonstrates how to use the IDisplayNameProvider interface (which substituted the IDataDictionary interface starting with the 11.2 XtraReports version) to change the names of the Field List items shown in both the Visual Studio and End-User report designers.

This example shows implementation of the IDisplayNameProvider interface for the System.Data.DataSet class, which allows the Field List to automatically retrieve the custom names from a data source that implements this interface.

See also:
- Best Practices of Implementing the IDataDictionary Interface for a Business Object;
- How to provide custom icons for the Field List in the End-User Designer.

How to supply the dashboard with data provided as a collection of records

$
0
0

The following example demonstrates how to supply a dashboard with data provided as a collection of records. The DataLoading event will be used for this purpose.

In this example, the data source is created for the Cars data table and added to the Dashboard.DataSources collection via the Dashboard.AddDataSource method on the first load. Then, the DataLoading event is handled to supply the dashboard with data.

Grid Views and Grid Control's View Repository

$
0
0

This sample demonstrates the basics of working with Views. The application features a grid control that can display the same data using three different views - LayoutView, GridView and AdvBandedGridView. The currently active View can be specified manually or automatically (depending on the GridControl's current width). You can also toggle the active View's footer visibility, which demonstrates how to write common code for different View types with a common ancestor.

By studying this sample application you will learn how to create Views and add them to the GridControl's View Repository, obtain the list of all available Views, get or set the currently active View, perform specific action when the active View changes, write common code for different View types.

Getting Started - Lesson 3 - Using of the Series Template for Auto-Created Series

$
0
0

This lesson demonstrates how to add a series template to a chart's diagram, and then automatically bind this template to a datasource.

Note that although in this tutorial we will bind the chart to aGSP.xml datasource, DXCharts supports a wide range of data providers. For more information on data binding, refer to the Providing Data section.

How to: Use the Entity Framework Model First in XAF

How to implement a drill-down feature for an ASP.NET MVC web report

$
0
0

This example demonstrates how you can implement a Drill-Down feature for a report displayed in the ASP.NET MVC DocumentViewer extension.


The main idea of this approach is to store the expanded state of report categories. As this is a web application, a Session is used to store it. Then depending on the category's expanded state its product list is shown or hidden. The DetailReportBand.BeforePrint event handler is used for this purpose.


To make the expand/collapse button working in a web report its HtmlItemCreated event handler is used to add required HTML attributes to it. When the expand button is clicked a client-side function is executed and a callback is sent to the CallbackPanel. In the controller, the expanded state of report categories is updated, and the report is updated.


DocumentViewer - How to customize a report parameter editor in MVC application

$
0
0

DocumentViewer - How to customize a report parameter editor in an MVC application


This example demonstrates how you can customize the editor used to edit the XtraReport parameter in the ASP.NET MVC application. The ComboBox editor bound to the Entity Framework model data is used there to edit the report's "CategoryID" parameter, instead of using a regular TextBox parameter editor.


The DocumentViewerSettings.SetCustomParameter method is used to customize the parameter editor. Use the MVCxDocumentViewerParameter.PropertiesEdit property to get/set the parameter editor properties.

How to print/export only those records that are checked via the XRCheckBox in the reports' detail band in a Web application

$
0
0

This example demonstrates how to conditionally include rows into a printed/exported web report. To select rows, the XRCheckBox is used. Once the user clicks on the corresponding XRCheckBox, the client script is executed (it is defined via the XRCheckBox.NavigateUrl property within the XRCheckBox.BeforePrint event handler), and a callback is sent to the server to update the internal storage (in the Session variable) of the skipped rows and regenerate a report in the ReportViewer accordingly.

Note that by inspecting the Page.Request["__EVENTARGUMENT"] parameter, you can determine whether the print/export command is initiated via the ReportToolbar button. If so, you should handle the XRControl.BeforePrint event for the DetailBand and XRCheckBox, and set the e.Cancel parameter to true based on your logic to skip unnecessary report content elements.

How to bind the Scheduler to a Microsoft SQL CE database - a sample application

$
0
0

This example demonstrates the WinForms Scheduler control bound to a Microsoft SQL CE database.

ASPxTreeView - How to change the height of the node

dxChart - How to display data from a remote data service (AngularJS)

Viewing all 7205 articles
Browse latest View live


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