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

How to specify dashboard parameter values on the client side

$
0
0

The following example demonstrates how to specify dashboard parameter values on the client side.

In this example, the ASPxClientDashboardViewer.ReloadData method reloads data in the data sources and accepts two dashboard parameters with the specified default values. This method is called in the Click event handler of the ASPxButton1.



How to apply conditional formatting to a range of cells (WPF Spreadsheet)

$
0
0

This example illustrates how to get started with conditional formatting that can be applied to cells that match a certain condition specified by a conditional formatting rule.

In particular, this sample demonstrates how to use the SpreadsheetControl API to create the following types of conditional formatting rules:

- a rule that formats cells whose values are above or below the average;

- a rule that highlights cells whose values are between or not between two specified values;

- a rule that formats top or bottom ranked values;

- a rule that highlights cells containing the given text;

- a rule that formats unique or duplicate values, blank cells and formula errors;

- a rule that highlights cells containing dates in the specified time period;

- a rule that formats cells whose values meet the condition expressed by the relational operator;

- a rule that uses a formula to determine which cells to format;

- a two-color scale conditional formatting rule;

- a three-color scale conditional formatting rule;

- a data bar conditional formatting rule;

- an icon set conditional formatting rule.





How to customize the RangeControl auto adjustment behavior

How to store a workbook in the database

$
0
0

This example uses the SaveDocument(DocumentFormat format) and LoadDocument(byte[] buffer, DocumentFormat format) methods of the SpreadsheetControl to store workbook in the database and retrieve it from there.

The test database is MS SQL local file database. It is included in the project.
To use another database, change the connection string as required and create a new table in that database. Use the script contained in the TestDB_table.sql file to generate a table for the MS SQL Server database.

Using WCF Data Services with XPO Data Service Provider for the XtraScheduler data binding

$
0
0

XPO now ships with the integrated support of the Open Data Protocol V2 (OData) so this example is not relevant for versions v2011 vol.2.5 and higher.

This example illustrates the use of the XPO Toolkit for binding the Open Data Protocol (OData) feeds exposed via the XPO Data Service Provider to a Scheduler.

The Open Data Protocol is a Web protocol for querying and updating data from a variety of sources. You can use the WCF Data Services to expose your data via this protocol. If your application is built upon the XPO with its specific data model, you'll need a data provider for XPO to connect to the WCF Data Services. Successfully the required data provider exists and can be downloaded from CodePlex at the eXpress Persistent Objects (XPO) Toolkit site.

This example consists of three projects. The DevExpress.Calendar.Web project implements WCF Data service (operating at fixed port 60996). The DevExpress.Calendar.Model project contains XPO data model, and the DevExpress.Calendar project displays the Scheduler control bound to XPO data.

To run the example, a running local SQLExpress server is required.
To create a database with data tables and fill them with data, run tests for the DevExpress.Calendar.Web project.
This step can't be avoided. Run tests for the DevExpress.Calendar.Web project - this action creates data tables in the database and fill the tables with sample data. To accomplish this, right-click the project in the Solution Explorer and select the 'Run test(s)' item in the context menu.
Now you can build the solution and run it.

Note that the data model used in this example is quite simple and does not support resource sharing, recurring appointments and reminders.

See Also:
OData Provider for XPO - Introduction

How to use the POCO mechanism for automatic IDataErrorInfo implementation generation

$
0
0

This Code Example demonstrates how you can use the POCO mechanism for automatic IDataErrorInfo implementation generation

ASPxTokenBox - How to remove items from drop-down after selection

$
0
0

This example illustrates how to show only items that were not selected in the item collection. I.e. all items that were selected will be removed from the drop-down window, and unselected items will be added there again.

How to create a master-detail report bound to an ORM (Entity Framework) model in MVC applications

$
0
0

This example demonstrates how to create a master-detail report bound to Object Relational Model in ASP.NET MVC applications.

This example uses the Entity Framework ORM model to provide a report with data, but you can use any object model instead.

Bind your XtraReport to your model master class by using the approach suggested in the Providing Data to a Web Report => Design-Time Data Binding Using BindingSource help topic. After your report is bound to the master class you can easily insert a detail report band by using the context menu in the report designer, as shown below:

FAQ:

- Why does the "Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data." exception occur?
This example uses Entity Framework 4 so you can easily bind the report to the query result. However note that starting with Entity Framework 4.1 you can not bind components to queries, so you need to convert your query to the List and then bind your report to this List. Use the following code for this purpose:

[C#]
report.DataSource=(fromcategoryinDataContext.Categoriesselectcategory).ToList();

[VB.NET]
report.DataSource = _ (From category In DataContext.Categories _Select category).ToList()

See also:
How to bind a report displayed in the DocumentViewer extension to the model's data


How to set the color of the RangeControl thumbnails

$
0
0

This example demonstrates how you can specify the color of the RangeControl thumbnails in code.
The background color of the thumbnail is determined by the ThumbnailControl template. The Border.Background property of the thumbnail is bound to the appointment it represents and uses a custom AppointmentToColorConverter. The converter specifies the color according to words encountered in the Appointment.Location string.

How to use HtmlEditor for editing GridView data

$
0
0

This example demonstrates how to use HtmlEditor to edit GridView row data

Example Comments

Added By: md imran at: 11/18/2013 5:20:50 AM    

please can you give me the full project and i want to edit and delete on right click context menu not clicking on the grid view........ Thanks please answer me fast as possible as you can............

Added By: md imran at: 11/18/2013 5:21:29 AM    

same as below gridview with html editor

Added By: Vladimir (DevExpress Support) at: 11/19/2013 9:59:25 PM    

Hello,

I am not sure that I correctly understand the details of your request. If you need this example project, you can download it by clicking the 'Example' link on the right. I recommend you also install Example Runner, which you can get by clicking the 'Example Runner' link. You can find it under the 'Example' link.
If you need to apply some changes to this scenario, but you encounter certain difficulties doing so, would you please create a separate ticket and describe the issue in greater detail? If possible, also send us a sample project to illustrate the encountered difficulties. This will help us understand their cause and provide you with a detailed answer.

How create file manager using GridControl

$
0
0

This example demonstrates how GridControl can be used to create a file manager like Total Commander

How to use FetchAppointments event for handling large appointment sets

$
0
0

The Scheduler behaves perfectly well when there is a reasonable amount of appointments to display. However for large appointment sets the application is fetching unnecessary data, increasing system workload and degrading the overall performance. You can use the FetchAppointments event to narrow the time frame for which appointments should be retrieved.

See the How to: Use the FetchAppointments Event for Faster Appointment Loading article for more information or download the project to see this technique in action.

Example Comments

Added By: Pete R at: 11/19/2012 2:35:19 PM    

I use the code from this sample for the FetchAppointments handler, and when I start my application, by the time the calendar is visible and ready to use, this method has been called 130 times, and in 86 of those times the data has been fetched from the DB even though the interval hasn't changed!! What is that all about?!?

How to localize ASPxScheduler dynamically

How to zoom DayView in a custom manner via the CTRL+MOUSE WHEEL combination

$
0
0

This example illustrates how to substitute the MouseHandlerService service for extending the standard zooming feature. To accomplish this task, you need to create a custom MouseHandlerServiceWrapper class and override its OnMouseWheel method. In this sample, the ViewZoomOutCommand and ViewZoomInCommand descendants with extended functionality are created. This approach allows you to zoom the DayView view from 5 minutes till 7 days.

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.

In this example, an XML file provides data about car models and corresponding prices. 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.

To update the displayed data, the DashboardViewer.ReloadData method is called. This raises the DashboardViewer.DataLoading event and allows supplying the dashboard with updated data.


How to create vertical columns' headers (rotate column header text 90-degrees) in ASPxGridView

$
0
0

This example demonstrates how to create vertical column headers. To accomplish this task, it is necessary to rotate the column header 90-degrees by using the cross-browser CSS style. This approach is tied to browser features, so the result could be different in different browsers. To learn more about text rotation, see the CSS Cross-browser Text Rotation article.


Example Comments

Added By: at: 3/19/2013 9:21:21 AM    

Hi There, I tried this sample without success. It is the first that fail. No error messages just the header text keeps horizontal.

Added By: Helen (DevExpress Support) at: 3/20/2013 7:40:07 AM    

Hi,
This approach is highly dependent on browser features, but works correctly in most popular browsers: IE7 and higher, Firefox, Opera, Chrome, and Safari. To determine the cause of this issue, I need additional information. Would you please create a ticket and describe the problem in detail?

Added By: Kevin Hansen at: 10/4/2013 2:34:23 PM    

This does not work in IE 9. Can I get some help? I have tried a lot of things but nothing is working in IE. This works great in Firefox and Chrome.

Thanks!

How to manage appointment's custom fields via the context menu

$
0
0

This example demonstrates how to add an additional menu item that represents a custom field to the default appointment's context menu. To achieve the goal, handle the PopupMenuShowing event of the SchedulerControl. In this sample, an end-user can change the custom field value ("Priority") via the dropdown list in the appointment's context menu or edit it in a custom Edit Appointment Form.

How to use a custom ASPxGridView localizer

How to bind a dashboard to a DataSet at design time and provide data at runtime

$
0
0

The following example demonstrates how to bind a dashboard to a DataSet at design time and fill it with data from the SalesPerson table in the Northwind database.


In this example, the dashboard is created at design time within Visual Studio and displayed in the ASPxDashboardViewer. The dataset is filled with data in the Dashboard.DashboardLoading event handler.

How to show an asterisk in the window title when an object in a View is modified

$
0
0

Scenario
This example shows how to customize a window title to add the asterisk mark when an object in the View is modified:

Steps to implement

1. Copy the ...\WinSolution.Module\DirtyTitleWindowController.xx file into YourSolutionName.Module module project.

See also:
How to: Customize a Window Caption

Example Comments

Added By: Apostolis Bekiaris (DevExpress) at: 2/7/2014 7:15:52 AM    

The controller in the System module of eXpandFramework v 13.2.6.8

Added By: PERAM BHARATH RAJ at: 3/21/2014 11:15:00 PM    

BHARATH

Viewing all 7205 articles
Browse latest View live


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