Quantcast
Channel: Developer Express Global
Viewing all 3389 articles
Browse latest View live

Blog Post: WinForms Camera Control (Shipping in v15.1)

$
0
0

Here's something we didn't get a chance to talk about leading up to release, a new UI component...Our WinForms Camera Control. As it's name implies, the control allows you to view/display live video from your Windows device directly on your form.


When multiple cameras are plugged in, you can select the desired device directly from the customization window and modify video settings as needed (contrast, brightness, saturation).

WinForms Camera Control Settings

The Camera Control also provides support for context buttons. This feature allows you to add custom functionality to the control by embedding context buttons when necessary (regular button, check button, rating control and track bar). And as you can see from the image below, it's been integrated into our Picture Edit Control. By using the popup menu associated with it, you can capture an image and save it using the Picture Editor.



We've also prepared a tutorial video showing the three different ways you can integrate the new Camera Control into your apps.



Webinar: 09-Jun-2015 10:00 PST - CodeRush for Roslyn Preview (Intermediate (200))

$
0
0
Join Mark Miller as he takes you on a tour of the new CodeRush for Roslyn. You’ll see what we’ve ported, what’s new, and get a peek at what’s coming. If you are interested in state-of-the-art developer tools, you won’t want to miss this webinar.

Blog Post: IntelliRush Hierarchical Filtering

$
0
0

In CodeRush Classic 15.1 and in CodeRush for Roslyn we added the ability to filter Intellisense members by the class where they are declared.

Here’s how it works. To show this in action, I created a new Windows Universal App, and opened the MainPage.xaml.cs file. Inside the constructor, I typed “this.”

Here’s what I see:

IntelliRush

That’s about 165 entries. That’s a lot to wade through. I can reduce the list if I have an idea of where to look in the hierarchy.

With IntelliRush’s new Hierarchical Filtering, this is easy. I tap the Ctrl key…

IntelliRushCtrlKeyPressed

On the right I see “Hierarchy”.

So I press the letter “h” and I see the class hierarchy listed on the right, from MainPage (the type of the “this” reference) up to Object

IntelliRushHierarchicalMenuUp

Now, if I know the class I want to see members from, I can simply press the number associated with that class. For example, if I only want to see members from the FrameworkElement class shown in this list, I simply press the number 4 from the hint, and my list of 165 members drops to 34:

IntelliRushFrameworkElementEntriesOnly

If I want to slice the class hierarchy to include a range of classes, for example UIElement and up, I can do the following:

  1. Tap Ctrl
  2. Press h

    The Hierarchy hint displays:

    IntelliRushHierarchicalMenu

    UIElement is number 5. So if I want to see members declared in UIElement and all its ancestors, all I need to do is…
  3. Press Shift+5

And with those three keystrokes IntelliRush shows only the entries declared in UIElement and up:

IntelliRushShowingObjectToUIElement

Shift + the class number shows members declared in the specified class and above.
Ctrl + the class number shows members declared in the specified class and below.

On most keyboards the Shift key is above the Ctrl key, so you may find their position (Shift above, Ctrl below) helpful in remembering which modifier key to hit.

The active class is always numbered zero, which allows for some useful shortcuts to keep in mind:

Member ScopeTo filter, tap Ctrl, press H, and then:
Active class only0
Parent class only1
Active & parent classes onlyCtrl+1
Parent class and aboveShift+1
All classes (resets an active filter)Shift+0

Combining Filters

You can combine a hierarchical filter with a member kind filter. Only want to see events declared in the active class or its ancestor? Easy. First, apply a hierarchical filter to isolate members to only the ancestry you’re interested in. Next, apply the member kind filter you want (e.g., tap Ctrl, then press E, to only see events).

Try it Out

IntelliRush’s Hierarchical Filtering is available in both CodeRush Classic 15.1 and CodeRush for Roslyn 1.0.

Blog Post: CodeRush for Roslyn (preview)

$
0
0

So the entire team has been working hard on CodeRush for Roslyn. This endeavor is huge: Hundreds, if not thousands of language-based features, replacing our core engine with Roslyn’s core engine, and porting tens of thousands of test cases.

Based on what we’ve seen so far, the end results, extremely efficient use of memory, even faster performance, and more, appear to justify the effort.

The Plan

The DevExpress 15.1 release includes two CodeRush products:

  1. CodeRush Classic15.1 (previously known as simply CodeRush). This is the same CodeRush we’ve shipped for years. It includes the full feature set, however 15.1 will not include support for C# 6 and VB 14 language features.
  2. CodeRush for Roslyn (CRR) 1.0 preview. CRR will not include the full CodeRush 14.2 feature set (more details below), however it will include full support for C# 6 and VB 14 language features (and beyond).

The Future of CodeRush Classic

At some point in the future, when we have ported the entire CodeRush Classic feature set to CRR, we intend to deprecate CodeRush Classic. We will continue to support and fix issues in CodeRush Classic for some time beyond this deprecation point, however CodeRush Classic is unlikely to ever get support for new language features (e.g., C# 6, VB 14, and beyond).

Which CodeRush Should I Use?

If you’re working in Visual Studio 2015 with the new language features in C# or VB, you should install CodeRush for Roslyn. If you rely on CodeRush Classic features that haven’t been ported yet, you’ll need CodeRush Classic. If you need both, you can install and use both (more on this in later posts).

Benefits

There are three significant benefits you can expect from CodeRush for Roslyn:

Massive Reduction in Memory Consumption

Refactoring tools need to understand the code. And to refactor and find references quickly, you need to parse the solution source. And that means memory. The bigger the solution, the more memory you need. In CodeRush Classic and in competing tools which have decided not to support Roslyn, the memory required is essentially doubled as the Visual Studio host is also parsing and storing similar results. Owners of huge solutions were hit hard when using tools like CodeRush Classic. With CodeRush for Roslyn, this doubling-up memory waste is a now thing of the past.

To see this savings in action, we created two benchmarks using the following hardware and software:

Machine: Intel® Core™ i7-363QM CPU, 2.40 GHz, 8GB RAM, SSD HD 
OS: Windows 8.1 Enterprise 64-bit
Software:

  • Visual Studio v14.0.22823.1 D14REL
  • CodeRush for Roslyn v0.9
  • Competing Product v9.1

Solutions Tested:

Benchmarks:

  1. Memory.

    Prep: Open solution. Build. Close all documents. Only Solution Explorer and Properties windows are active. Close solution. Close Visual Studio.

    Memory Test: Start Visual Studio, open solution, wait until devenv.exe process CPU usage falls to 0. Calculate managed memory using VSIX plug-in.

  2. Performance.

    Prep: Open Visual Studio with Start Page opened. Wait until all extensions are successfully loaded.

    Performance Test: Click the solution link the solution in the Recent tab and start the timer. Stop the timer when the solution loading progress bar is complete. For VS and CodeRush the progress bar appears in the Solution Explorer. Competing products may place a progress bar in the lower-left corner of the VS status bar.

At DevExpress we have a policy of not mentioning competing products on our site, so I can’t reveal the name of the product we compared CodeRush to. However I can tell you the version number of the competing product we tested was 9.1, and I can tell you the competing product is one that has previously announced they would not exploit the Roslyn engine (which means you would expect their memory usage to be noticeably higher than Visual Studio’s).

Results of the memory tests:

MemoryUse

For the small solution, DotNetOpenAuth, CodeRush uses only 6MB.

For the medium-sized solution, Orchard, CodeRush uses 13MB.

And for the large solution, opening the source code to Roslyn itself, CodeRush uses 55MB.

Faster Performance

Not only was CodeRush Classic storing essentially the same results as Visual Studio was, it was also parsing the same code a second time (just like some competing tools still do). That waste stops with CodeRush for Roslyn. Every feature works noticeably faster and feels snappier, while CRR adds only 0-2 seconds to solution-open times:

 SolutionOpenTimes

Better Language Support

Expect CodeRush for Roslyn to immediately understand and support new C# and VB language features as they are released by the Visual Studio team.

Support for Languages Beyond C# and VB

CodeRush for Roslyn will include parsers and code generators from the CodeRush Classic engine for any languages that Roslyn doesn’t support yet, including XAML, CSS, HTML, and XML. As Roslyn adds support for these languages, We’ll update CRR accordingly to exploit the new support, which should result in additional memory reduction and faster performance.

What’s really exciting, is that as the Visual Studio team and third parties move new languages under the Roslyn engine, you can expect CodeRush for Roslyn to understand those as well. There may be some changes required on our side to support the new languages, however the effort is a small fraction of what it was before Roslyn.

The Preview is Free

Today we’re releasing an early preview of CodeRush for Roslyn on the Visual Studio Gallery. We intend to release updates every four weeks as we approach the final release. The install is VSIX-based, which means updates are quick and easy and can happen from inside Visual Studio.

What’s New

In addition to a port of CodeRush classic features (see below for details), CodeRush for Roslyn also includes two new features.

IntelliRush Hierarchical Filtering

In this release IntelliRush gets a great new feature, Hierarchical Filtering. This lets you slice up the Intellisense hierarchy to only see entries from specified classes in the ancestry.

IntelliRushHierarchicalMenu

 

Code Coverage

The Code Coverage window shows which lines of code are covered by test cases and which are not.

 image

Features Ported from CodeRush Classic

Features included in the CodeRush for Roslyn (preview):

 image

 image

We Need Your Feedback

Let us know what you love, what you’re missing, and what you’d like changed. When CodeRush for Roslyn is published (awaiting final approval from the powers that be), it will be available here.

Webinar: 23-Jun-2015 10:00 PST - What's New for VCL Controls (v15.1) (Intermediate (200))

$
0
0
Join Julian Bucknall and learn about the new products and features shipping inside our updated VCL Subscription including the official release of the Rich Text Editor Control, the interactive rating control, new Office 2016 Ribbon styles and much more!

Blog Post: ASP.NET MVC - Secondary enhancements (Shipping in v15.1)

$
0
0

Now that the DevExpress v15.1 release is available, I wanted to highlight 3 smaller enhancements that you may not have seen:

Minor Enhancements

1. GridView - Provide the capability to use the Search Panel in Custom Data Binding mode.

A new SearchPanel property has been added to the GridViewModel class.

The property's type (DevExpress.Web.Mvc.GridViewSearchPanelState) exposes the following properties:

  • ColumnNames
  • Filter
  • GroupOperator

(more info)

2. PivotGrid - Provide a way to customize control settings before export.

The new MVCxPivotGridExportSettings.BeforeExport property allows you to customize settings before exporting.

(more info)

3. DevexpressEditorsModelBinder - Support binding multiple values selected in MVC Extension editors to a Model's collection-type property.

DevExpressEditorsBinder now supports binding to complex collection-type models and model properties, in a similar manner as the default model binder (DefaultModelBinder) does.

(more info)

What's new in v15.1

The DevExpress ASP.NET MVC extensions have gotten some major new upgrades and enhancements in the v15.1 release. Check out the full list here:

http://devexpress.com/new

And be sure to check out the latest addition to our MVC suite:

New Rich Text Editor

V15.1 includes our newest MVC Extension – the DevExpress Rich Text Editor for MVC. Like its WebForms counterpart, this extension allows you to introduce powerful word processing capabilities to your next MVC app. The Rich Editor ships with a comprehensive set of text formatting options and a rich collection of Microsoft Word-inspired features.

DevExpress MVC Rich Text Editor - Online demo

Thanks!


Your Next Great .NET App Starts Here

Year after year, .NET developers such as yourself consistently vote DevExpress products #1.

Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: DevExpress.com/trial (free support is included during your evaluation).

Blog Post: WinForms Grid: Excel Data Export Customization

$
0
0

If you've used our WinForms Grid in the past, you already know that with a single call to the ExportToXlsx, method you can export the contents of the grid and generate a Microsoft Excel document.  In this post, I want to quickly discuss use of our updated Excel Data Export engine and its numerous customization options. In particular, I want to show you how to customize cell values, add a header/footer and get you some code examples so you can implement similar solutions in your WinForms apps.

Excel Data Export - Header Customization

To add a header and display personalized information, such as company name, logo and contact information, we need to handle the CustomizeSheetHeader event. The methods (AddRow, MergeCells and InsertImage) provided by its event arguments allow us to add rows to the output, merge cells, insert images, etc.

void options_CustomizeSheetHeader(ContextEventArgs e){
   
    // ...
    var file = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("GridReportBlog.Resources.1.jpg");
    if(file != null){
        var imageToHeader = new Bitmap(Image.FromStream(file));
        var imageToHeaderRange = new XlCellRange(new XlCellPosition(0, 0), new XlCellPosition(5, 7));
        e.ExportContext.MergeCells(imageToHeaderRange);
        e.ExportContext.InsertImage(imageToHeader, imageToHeaderRange);
    }
    // ...
}


Resulting output below...

WinForms Data Grid - Excel Export with Header Customization


Excel Data Export - Cell Customization

Let's now take a look at the CustomizeCell event and how we can use it to replace values in a Boolean column with the check mark symbols. "☑" and "☐"

XlCellAlignment aligmentForDiscontinued = new XlCellAlignment() {
    HorizontalAlignment = XlHorizontalAlignment.Center,
    VerticalAlignment = XlVerticalAlignment.Center
};
void options_CustomizeCell(CustomizeCellEventArgs e){
    if(e.ColumnFieldName == "Discontinued"){
        if(e.Value is bool){
            e.Handled = true;
            e.Formatting.Alignment = aligmentForDiscontinued;
            e.Value = ((bool) e.Value) ? "" :"";
        }
    }
}

Resulting output below...

WinForms Data Grid - Excel Export Cell Customization


Excel Data Export - Footer Customization

Finally, to add a footer to the exported file, we'll need to use CustomizeSheetFooter event. As you can see below, we've added two new rows to the output document and specified formatting using XlFormattingObjects.

void options_CustomizeSheetFooter(ContextEventArgs e){
    e.ExportContext.AddRow();
    var firstRow = new CellObject();
    firstRow.Value = @"The report is generated from the NorthWind database.";
    var rowFormatting = CreateXlFormattingObject(true, 18);
    rowFormatting.Alignment.HorizontalAlignment = XlHorizontalAlignment.Left;
    firstRow.Formatting = rowFormatting;
    e.ExportContext.AddRow(new[]{ firstRow });
    // ...
}

WinForms Data Grid - Excel Data Export Footer Customization

Hopefully this quick tutorial will help you get started with our Excel Data Export engine and help you better integrate your WinForms app with Microsoft Excel.


Blog Post: .NET PivotGrid and Dashboard: OLAP Performance Improvements

$
0
0

OK, let me state the blindingly obvious for a moment: the performance of aggregation or sorting operations (or both!) are key factors when you’re working with OLAP data sources. So, with v15.1, we took the time to do some research and design and have managed to increase the speed of the data engine used in the .NET Pivot Grid and Dashboard by optimizing some basic data processing – anything from constructing queries to the parsing of returned data.

Sorting is now performed on the client side. This allows you to speed up the process of visualizing data in complex scenarios such as sorting by summary and sorting in Tabular mode. Moreover, as an added bonus, using client sorting gives you the capability to perform custom sorting with the CustomServerModeSort events.

To compare the new Pivot Grid’s performance with other products in OLAP mode, we investigated two scenarios. With both scenarios, the pivot data and row areas display fields from the Adventure Works cube and are deployed on a local machine.

Pivot Grid Performance Improvements v15.1

 

ScenarioPivotGrid v14.2PivotGrid v15.1Competitor 3Competitor 4
#16 sec3 sec5 sec4 sec
#21 min 20 sec19 sec35 sec1 min 40 sec

The chart and table shown illustrate the performance improvements of the Pivot Grid in OLAP mode in v15.1 when sending queries to the Adventure Works cube. The data shows a comparison with the old v14.1 version and a couple of our (unnamed) competitors in this space. Note that the ADOMD provider was used to establish a connection to the OLAP cube.

Here is the data we used for each of the two scenarios.

Scenario 1

Data area:Internet Sales Amount, Internet Order Quantity
Row area:Postal Code, Product
Row count: ~ 100 000

Pivot Grid Performance Improvements Scenario 1

Scenario 2

Data area:Sales amount, Total Product Cost
Row area:Business Type, City, Product
Row count: ~ 600 000
Sorting:Product field is sorted by Total Product Cost

Pivot Grid Performance Improvements Scenario 2

I’m sure you’ll agree with me that these basic performance improvements will enhance the snappiness of the data analytics parts of your applications.


Webinar: 21-Jul-2015 10:00 PST - How to Create an Office 365 Clone (Product Features)

$
0
0
Join Mehul Harry and Don Wibier and learn how we built the new DXDocs demo that was introduced in the v15.1 release. This demo includes CMS like functionality and integrates powerful DevExpress controls like the Spreadsheet, Rich Text Editor, File manager, Upload control, and more!

Webinar: 25-Jun-2015 10:00 PST - Entity Framework and DevExpress ASP.NET (Intermediate (200))

$
0
0
Join Mehul Harry and Don Wibier and learn how to use DevExpress ASP.NET WebForms and MVC controls with the Microsoft Entity Framework. We'll start with a short overview of Entity Framework and dive into a few code examples.

Blog Post: ASP.NET Design-Time Feature Browser (Shipping in v15.1)

$
0
0

Our UI controls are some of the most feature–rich controls in the market, but enabling or disabling certain features means that you need to dig (deep) in your object inspector and the documentation to find the required ones. And that can take a bit of time.

In v14.2 we added the Designer Dialog, and now, to make life even easier, we've introduced our Feature Browser into that dialog. Those of you also using our WinForms controls will already know what I mean with that, since we introduced this in v14.1 for our WinForms controls.

What is the Feature Browser exactly?

In the Feature Browser we have grouped certain “desired behavior” or appearance features together. This makes it easy to access the properties needed for some functionality since they are put right next to each other.

Not only did we filter the properties per feature, we also embedded context sensitive help on a specific feature (instead of a property) all together in the same dialog. You can even click hyperlinks inside the help to set one or more properties in a single operation!

Where can I find it?

The Feature Browser is available for 2 complex controls: the GridView and HTML Editor. It appears when you click the Task button in the Design Surface, followed by clicking the Designer item inside the task menu.

The first page of the Designer contains the Feature Browser, and this allows you to setup the control in seconds.

The Feature Browser for the GridView control

Since the GridView control is the most complex control in our ASP.NET suite and setting up things like ServerMode, Master-Detail, Sorting, Grouping, Summaries and Totals require you to jump into the documentation (at least for the first time), we have put context sensitive help right into the Feature Browser. There is no longer any need to switch back and forth into the documentation.

Feature Browser for the HTML Editor

Though the HTML Editor ships with tons of features like the Tag Inspector, Place holders, Content Element Filtering and choosing to use a Toolbar or Ribbon Control, it is now simpler to configure. Just like with the GridView, there is no need to jump into the documentation.

For that reason, the Context Sensitive help is not included in the HTML Editor Feature Browser. Instead we have made certain choices more visual. For example, changing the Toolbar mode will show you immediately what the appearance will be, and which items are available in the toolbar or ribbon.

Let me know how much it speeds up your development time, or if you’re missing certain features!

Blog Post: VCL Rating Control (Coming soon in v15.1)

$
0
0

We are approaching the first beta of the newest release for our VCL customers and throughout the next week, Julian and I will describe some of the features/products we'll ship in v15.1.

I'll start things off with a quick description of a new control we'll include as part of this release - the DevExpress VCL Rating Control. The control will be available in both unbound and data-aware mode and can be used on a standalone basis or as an in-place cell editor for container components such as the ExpressQuantumGrid.

DevExpress VCL Rating Control

The new Rating Control will be part of the ExpressEditors Library and will offer the following customization options: 

  • Change control orientation from horizontal to vertical.
  • Change control direction.
  • Modify the number of visual elements (stars) displayed in the control.
  • Use custom element images.
  • Use one of three element fill modes (entire star, half-star precision or fill star by the control's value)

There are a number of interesting use-cases for a Rating Control inside a Windows app. We'd love to hear how you might potentially use this control in your projects...


Blog Post: WinForms Layout Control & CRUD Forms - New Table Layout vs Flow Layout Mode

$
0
0

We have a lot of customers who rely on the flexibility of our WinForms Layout Control to create CRUD forms. One of my favorite features is its runtime customization capabilities - something I'll talk about later in the month. In this post, I want to recap something I discussed earlier this week - support for Data Annotation Attributes, a new feature allowing you to create detail forms without writing any code. 

With Data Annotation Attributes, you simply assign a business object as the Data Layout Control’s data source and call the RetrieveFields method. The Layout Control automatically generates the layout by using the attributes applied to the object’s fields. Of course, your business object can contain nested objects and the Layout Control is designed to render those as separate groups. The following is an example in which a Transaction object contains Account and Category nested objects.

WinForms Form Layout - Control Attributes

To simplify things as much as possible, the Layout Control includes an AutoRetrieveFields option - which re-generates the layout each time a data source is assigned. If you find that the auto-generated layout pictured above is too "simple" or if issues arise as a result of stretched controls (for wide forms), you can easily rearrange layout items in code.

LayoutControlGroup autoGenerateGroup = dataLayoutControl1.Root.Items[0] as LayoutControlGroup;
LayoutControlGroup accountItem = autoGenerateGroup.Items[0] as LayoutControlGroup;
LayoutControlGroup categoryItem = autoGenerateGroup.Items[1] as LayoutControlGroup;
LayoutControlItem dateItem = autoGenerateGroup.Items[2] as LayoutControlItem;
LayoutControlItem amountItem = autoGenerateGroup.Items[3] as LayoutControlItem;
categoryItem.Move(accountItem, DevExpress.XtraLayout.Utils.InsertType.Right);
amountItem.Move(dateItem, DevExpress.XtraLayout.Utils.InsertType.Right);


WinForms Data Layout Control

If screen resolution issues persist for wide forms, you can switch to our Flow Layout mode. In this mode, the Layout Control automatically arranges controls back-to-back, wrapping at the Layout Control's rightmost edge (note that nested groups are not supported in Flow Layout mode).

To activate Flow Layout mode and specify cell size, we must set two properties:

autoGenerateGroup.CellSize = new System.Drawing.Size(50, 24);
autoGenerateGroup.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Flow;

This animation below demonstrates the benefits of using Flow Layout mode - as you can see, the form is adaptive as its resized.

DevExpress WinForms Layout Control - Flow Mode


The third option to form design when using our Layout Control (new in v15.1) is Table Layout mode. In Table Layout mode, the control area is divided into rows and columns. Column/row size can be in absolute or relative values. Controls are placed in a specific cell addressed by a column and row and can occupy two or more columns/rows simultaneously.

Let’s take a look at Table Layout mode and create a table consisting of two columns and three rows. Column widths will be 40% and 60% respectively. The COMMENT field will occupy two columns.

LayoutControlGroup autoGenerateGroup = dataLayoutControl1.Root.Items[0] as LayoutControlGroup;
autoGenerateGroup.OptionsTableLayoutGroup.Add(new ColumnDefinition(autoGenerateGroup, 40, SizeType.Percent));
autoGenerateGroup.OptionsTableLayoutGroup.Add(new ColumnDefinition(autoGenerateGroup, 60, SizeType.Percent));
autoGenerateGroup.OptionsTableLayoutGroup.Add(new RowDefinition());
autoGenerateGroup.OptionsTableLayoutGroup.Add(new RowDefinition());
autoGenerateGroup.OptionsTableLayoutGroup.Add(new RowDefinition());
autoGenerateGroup.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
autoGenerateGroup.Items[4].OptionsTableLayoutItem.ColumnSpan = 2;
Here's the form at runtime...

DevExpress Layout Control - Table Mode

To summarize, the DevExpress Layout Control now gives you 3 ways to quickly create high-impact CRUD details forms:

  1. Using DataAnnotations attributes to generate layouts on-the-fly.
  2. Using the control's Flow Layout mode to generate adaptive forms.
  3. Using Table Layout mode to generate the form by placing controls into specific table cells.

We'd love to know how you use the Layout Control in your WinForms project. Your continued feedback will help us refine the features shipping in this product.


Blog Post: ASP.NET Rich Text Editor - Using DocVariable to Add Custom Data and Charts (Shipping in v15.1)

$
0
0

In the "What's new for ASP.NET v15.1" webinar, I showed the mail merge like features of the new DevExpress ASP.NET Rich Text Editor. Click the image below to see the webinar video:

In this blog post, I'll explain some more details about this great new functionality.

Fields Support

In the DevExpress ASP.NET Rich Text Editor (ASPxRichEdit), document fields are special placeholders for non-static data that might change (be updated on field update). These placeholders are replaced with actual data when the document is rendered for display or print. Using fields, you can automate different aspects of your document, such as auto page numbering, inserting actual dates and times, etc. The default Mail Merge ribbon tab can be used to work with fields (create, update, switch between field display modes). There are six field codes:

  • DATE - Inserts the current date and time.
  • TIME - Inserts the current time.
  • HYPERLINK - Enables you to navigate to another location or to a bookmark.
  • NUMPAGES - Inserts the total number of pages.
  • PAGE - Inserts the number of the page containing the field.
  • DOCVARIABLE - Enables you to programmatically insert complex content when this field is updated.

Docvariable

The DevExpress ASP.NET Rich Editor (ASPxRichEdit) enables you to store custom information in the document using document variables. To insert a document variable in the document, use the DOCVARIABLE field code.

The DOCVARIABLE field code has the following syntax:

{ DOCVARIABLE "variable name" "argument1" "argument 2"... }

Argument1, Argument2, etc. are optional parameters.

How to insert a DOCVARIABLE field

To add the Docvariable field code to your RTF doc:

  1. Press Ctrl+F9 to insert a new field
  2. write the DOCVARIABLE keyword, space and a name of a variable

Calculate the field value

To calculate a value of this field in ASPxRichEdit:

First, override the CalculateDocumentVariable event.

In the handler, you can calculate a field result. Get a variable name and arguments (if they are defined) from the event args. Then set the Handled and Value properties. The Value property can have the string or Document types. If it’s set with a string then this string will be inserted as a field result.

If you want to insert some advanced content, you can set the Value property with a Document instance. So, other rich-text document can be inserted as a field result in a current rich-text document.

Here's an example:

protectedvoidDemoRichEdit_CalculateDocumentVariable(object sender, CalculateDocumentVariableEventArgs e) {switch(e.VariableName) {case"Chart":var sales = GetSales(e.Arguments[0].Value);
                DocumentImageSource chart = DocumentImageSource.FromStream(CreateChart(sales));
                RichEditDocumentServer srv = new RichEditDocumentServer();
                srv.Document.Images.Append(chart);
                e.Value = srv.Document;
                e.Handled = true;break;case"CommonSales":var commonSales = GetCommonSales(e.Arguments[0].Value);
                e.Value = commonSales.ToString("C");
                e.Handled = true;break;default:break;
        }
    }

Demo

Try this feature online now:

DevExpress ASP.NET RichEdit demo - Document Variables Support

Thanks.

Your Next Great .NET App Starts Here

Year after year, .NET developers such as yourself consistently vote DevExpress products #1.

Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: DevExpress.com/trial (free support is included during your evaluation).

Blog Post: DevExpress VCL v15.1 – supported compilers

$
0
0

With v15.1 we are trimming the number of compilers (and therefore IDEs) that we are supporting with the DevExpress VCL subscription. As I’ve said several times over the years, supporting older compilers comes with a cost, perhaps intangible in many ways, but it’s still there and does have an effect.

In essence, if the compiler has XE in the name (and there are eight of these, times two for Delphi and C++Builder), we support it in both 32-bit and in 64-bit modes with our VCL Subscription. That’s the simple rule. Rule 2 is that RAD Studio 2010 is also supported (for now), although the new Rich Text Editor – you saw the beta announcement here 6 months ago, stay tuned for more news in another post – is not supported. And that’s it.

The biggest change then from v14.2 to v15.1 is that we are dropping support for what might be termed “the non-Unicode compilers”: Delphi 7, Delphi 2007 and C++ Builder 2007. As it happens, the new controls we’ve released from v14.1 onwards (spreadsheet, rich text editor, maps, gauges, etc) have not supported these compilers anyway. All we’ve provided over the past year for these compilers have been some enhancements plus bug fixes. Please note that Embarcadero do not provide support for them either (in fact, the last email I read was that XE3 is about to be dropped from their support and upgrade paths).

(Aside: it’s at this point that I did some research. Delphi 7 was released in August 2002, very nearly 13 years ago. I was using a Dell Inspiron 8000 at the time, with a Pentium III and 512MB RAM, running Windows XP (it cost me $3K). I wrote the Deflate and Inflate code for TurboPower’s Abbrevia on that machine. Delphi 2007 was released in March 2007, over 8 years ago. By any stretch of the imagination, these are old: just think of the progress made in computers, technology, apps, run-times, and programming languages over the last 8+ years.)

With v15.1 we wanted to do some major restructuring of the controls. The first part of this will be using the engine that’s part of the new spreadsheet control to provide way better XLS/XLSx export facilities to the grid, treelist, etc. This, candidly, would not be possible with the non-Unicode compilers. All in all, we felt the best business course of action was to consolidate our code to use the latest compilers and language features; it’s the only way we feel we can continue to provide deeper, broader, and, frankly, better features and functionality to our VCL customers.

Having said that, v14.2 is not going away just yet. Yes, it will be superseded by v15.1 in a couple of weeks, but we shall continue to provide bug fixes to it for the next year. Hence if you are an active customer you will still be able to download the minor releases until it, in turn, is retired.

My recommendation though is to move on. It seems to me that every month Embarcadero are providing discounts to upgraders. I would take advantage of them. Retire your legacy apps perhaps, or migrate them to the latest RAD Studio: there will come a day that we will start removing support for the early XE IDEs too. And, of course, if you’re using a later RAD Studio already, stay tuned for more news over the next few days on the new features in v15.1 of DevExpress VCL.


Blog Post: DevExpress VCL Spreadsheet control (Coming soon in v15.1)

$
0
0

As Ray said yesterday when talking about the new Rating Control, he and I are going to take it in turns describing the new features and functionality in v15.1 over the next few days. Today, it’s my turn, so welcome to the new features in the ultimate in data analysis controls: the DevExpress VCL Spreadsheet.

Data Export

The first new piece of functionality for the spreadsheet isn’t really about the control itself, but about how it is used with controls in the rest of the VCL Subscription. In essence, we’ve now incorporated it as a principal component of our data export engine. This means that we now have one and only one export functionality for grid or tabular data, and this has allowed us to significantly simplify the data export engine's code and avoid code duplication when implementing new features, both of which are vital to a quickly changing feature set.

In particular, this merging of code provides the following features:

  • Ability to export data to CSV files
  • Ensuring cell number formats in the exported XLSX file are based on data cell display formats shown in the Grid, Tree List, Pivot Grid, and Vertical Grid controls
  • Detail grid Views can now be exported to XLS, XLSX, or TXT files
  • The progress of export operations can now be tracked, and aborted if necessary
  • Custom encoding formats for strings exported to TXT or CSV files
  • Ability to export images to XLS files, including those displayed by cxImageComboBox grid items

One consequence of this work is that the ExpressSpreadSheet Suite is now required for products – especially the grids and treelists – that provide export capabilities and will be automatically installed with them. Since the new spreadsheet was written to support later compilers only, this meant we had to drop support for older compilers.

Once DevExpress VCL v15.1 is released, the ExpressSpreadSheet Suite will be added to the ExpressGridPack and ExpressQuantumPack subscription packs. We will provide a free upgrade to the new SKUs to all customers that own an active subscription to these packs.

New functionality

The v15.1 release includes the following new features for the DevExpress VCL Spreadsheet Control:

  • Ability to outline or group data in a worksheet. This gives your users a much better facility for analyzing data using the spreadsheet.
    VCL-Spreadsheet-Control-Grouping-Outline-15-1

  • A new built-in dialog for find and replace operations.

    VCL-Spreadsheet-Control-Find-Replace-Dialog-15-1
  • Support for Excel template files (XLT and XLTX files).
  • Ability to export an active worksheet to a TXT, XML, or HTML file.
  • Ability to iterate through all generated cell objects.
  • Support for the keyboard shortcuts that are available in Excel.

I’m sure you’ll agree these are some welcome new features (especially the data export enhancements). No doubt there are other features you’d like to see with the spreadsheet control, so please do let us know.

Blog Post: WinForms Demos: Code Snippets

$
0
0

We've done our very best to create demos that emphasize the flexibility of our WinForms controls and hopefully give you a clear understanding on how to implement them within your projects. As you already know, many of the demos we ship are module-based and emulate real-world usage scenarios.

To help reduce the amount of time you spend working through our demos and help you master use of DevExpress controls in the shortest possible time, we created a small set of API Code Examples for the v15.1 release cycle. These case-oriented examples demonstrate API usage and illustrate common solutions to everyday tasks. In addition, the examples we've created allow you to review the code, modify it as needed and immediately view your results...

At present time, you can find API Code Examples in three shipping demos: Automatic Form Layout Control, MVVM Best Practices and Desktop UI Manager. Once you open the appropriate demo, you will see the following...


 
...The application is composed of three regions: 

  1. Navigation area on the left. Displays all available code snippets categorized into logical groups, and allows you to quickly locate desired examples.
  2. Result area on the right. Demonstrates the result of the selected code snippet.
  3. Code editor at the bottom. Displays the code and allows you to modify it.

When you select a code snippet or modify code, it's automatically compiled and the output displayed within the Results section.

WinForms Demos - DevExpress Code Snippets


These Code Examples give you the ability to create a temporary Visual Studio project and incorporate the selected code snippet. Click the Run in Visual Studio button on the Ribbon to generate the project and open it inside Visual Studio.

WinForms Demos - Visual Studio Code Snippets


One final note - Going forward, when running any demo as a binary executable file, you can easily open its corresponding C# or Visual Basic solution by using the Open Solution button on the Ribbon bar.

WinForms Demos - Open Solution
 


Blog Post: DevExpress VCL Rich Text Editor (now released in v15.1)

$
0
0

In our last VCL release cycle, we shipped the DevExpress VCL Rich Edit Control - our Microsoft Word inspired word processor - as a community tech preview. With our upcoming release, we'll officially launch our VCL Rich Text Editor and will incorporate the following new features/capabilities: 

  • Table support
  • Multi-column layout
  • Built-in context/popup menu
  • Simple and Draft document views
  • Horizontal and vertical rulers
  • Image sizing
  • Support for plain text format files
  • OLE drag and drop support

Here are a couple of screenshots demonstrating these new features.

RTF - Horizontal and Vertical Rulers

VCL Rich Text Editor - Horizontal and Vertical Rulers

RTF - Multi Column Layout

VCL Rich Text Editor - Multi-Column Layout

In addition, this update will include the following new multi-purpose dialogs:

  • Font Editing
  • Bullets and Numbering
  • Find and Replace
  • Insert Table
  • Table Properties
  • Tabs and Symbols

Please note that in the v15.1 beta, the Rich Edit Control only supports RAD Studio XE or later and can only be used in 32-bit apps created with Delphi/C++Builder.

As always, we welcome your feedback and comments - let us know how you are planning to use our VCL Rich Text Editor in your next VCL project.

Blog Post: Excel Document Generation for .NET Developers - Your Options

$
0
0

In blog posts leading up to our launch couple of weeks ago, I described our new XL Export Library – the ultra fast Excel data export engine that generates spreadsheet files by writing them directly to a stream.

If you have used our Document Generation libraries in the past, you may be familiar with the DevExpress Spreadsheet Document Server....A non-visual component library for .NET with complete spreadsheet generation functionality. The Spreadsheet Document Server API allows you to load, create, modify, print, save and export spreadsheet documents and of course perform data analysis and calculate worksheet formulas.

Since the release of v15.1, a number of you have asked for guidance as to which of these 2 products to use within your projects. in this post, I'll try to explain the differences between the two product libraries and hopefully help you choose the right product for your next .NET project. 

I'll start with the key differences between the Spreadsheet Document Server and the new XL Export Library -- the basic algorithms each use for document generation.

Spreadsheet Document Server

The Spreadsheet Document Server's architecture is based on its internal document model which stores all spreadsheet data in memory. This means that when you load a document, the Spreadsheet Document Server reads the file (using the appropriate file format, for example XLSX) and imports data (cell values, formulas, format settings, etc.) to the document model. At this point, you can use the spreadsheet API to modify the model or perform calculations over cell values. Once complete, you can call the SaveDocument or ExportTo* method and export the document model with modified data to the desired file format.

Generating a new document works in much the same way. When you create a new workbook using API methods, the spreadsheet control creates a new document model, generates its content and then exports it to the specified file format. This "universal" approach allows you to use a single library to both read/edit and create new documents....but it can cause significant problems with performance. Generation of very large Excel files will often lead to the high memory consumption and associated time delays.

The graphic below helps illustrate the processes used by the Spreadsheet Document Server and XL Export Library to generate files...

.NET Spreadsheet Excel Document Generation

XL Export Library

As you can see in the graphic above, the DevExpress XL Export Library does not use an internal document model and writes data directly to the output stream in consecutive order: row by row, cell by cell. This approach allows it to generate Excel files at very high speeds, with very low memory consumption (because there is no need to put data into an in-memory document model and then export the model's content to the output stream).  

The charts below breakdown the performance advantages when exporting data using the DevExpress XL Export Library. When generating a large XLSX file with 1048576 rows and 20 columns, the XL Export Library is 2.5X faster and uses up to 10 times less memory than the Spreadsheet Document Server.


Your Best Option and Our Recommendation

If performance is your number 1 requirement when generating/exporting data to Excel, and you don't require the capabilities built into the Spreadsheet Document Server, then it's best to use the XL Export Library. It's optimized for performance and allows you to create extremely large spreadsheet files in the most efficient manner possible (important to those of you generating numerous Excel documents on the server side).

I'll wrap this post up with a summary of both products so you can decide what works best for you and your business.


Supported Document Formats

Document Format

Spreadsheet Document Server

XL Export Library

XLSX

Yes

Yes

XLS

Yes

Yes

CSV

Yes

Yes

XLSM

Yes

 

XLTX/XLTM/XLT

Yes

 

TXT (Tab Delimited Text)

Yes

 


Supported Document Features

Feature

Spreadsheet Document Server

XL Export Library

Workbook/Worksheet

Yes

Yes

Rows/Columns

Yes

Yes

Cells

Yes

Yes

Merged cells

Yes

Yes

Formulas

Yes

Yes

Calculation engine

Yes

 

Custom functions

Yes

 

Defined names

Yes

 

External links

Yes

 

Cell styles

Yes

 

Cell formatting

Yes

Yes

Conditional formatting

Yes

Yes

.NET number formats

 

Yes

Theme colors

 

Yes

Pictures

Yes

Yes

Charts

Yes

 

Comments

 Yes

 

Sparklines

Yes

 

Hyperlinks

Yes

Yes

Tables

Yes

 

Filtering

Yes

Yes*

Grouping/Outline

Yes

Yes

Data validation

Yes

Yes

Frozen panes

Yes

Yes

Page breaks/ Page setup

Yes

Yes

Print area/options/titles

Yes

Yes

Headers/footers

Yes

Yes

Error checking options

Yes

Yes**

Protection

Yes

 

Document properties

Yes

Yes

*Limited support: enable/disable filtering for the data range without specifying filter criteria.
 ** Available for the entire worksheet data range, not a specific cell range.


To learn more about our new XL Export Library, review our Demo Center examples (see the XL Export API module in the Document Server category) and Code Examples database:

As always, we welcome your feedback - tell us know what you think of our new XL Export Library and how you might use it going forward.


Blog Post: ASP.NET File Manager - Enhancements (Shipping in v15.1)

$
0
0

We have added some very useful features to the DevExpress ASP.NET FileManager in v15.1

OneDrive® Inspired Selection

A lot of users do not know how to perform multi selection within MS-Windows list controls by holding down the Shift or Ctrl key while selecting multiple items with the mouse.

In the web-interface of OneDrive®, and also the Windows File Explorer of Windows 8, Microsoft has added a really nice feature; when hovering over an item, a checkbox will appear with all selectable items and when you tick the first one, the checkboxes will stay visible so you can easily select multiple items without the use of the Ctrl or Shift key.

We have put in this same functionality inside our FileManager so you can offer this feature to your end users as well!

FolderItems in Filemanager area

For easier navigation, we have included the sub-folders of the currently selected folder in to the file area. This means you can navigate quicker through the file structure because you don’t need to move your mouse forward and back from the File Area to the Folder Tree. We also included the Parent-folder there as well.


image

Breadcrumbs with path info for navigation

To make navigation even better, you can now add the breadcrumbs feature containing the current location on top of the File Area. It allows you to jump to any of the parent folders with just a single click, and navigate your way from there.

image

Uploading files without the Upload panel visible

You can now hide the upload panel from the file manager. In this instance, file upload operations can be initiated by using the upload button, by dropping a file to the control's file area, or by clicking an element specified as a File Upload dialog trigger.

The last feature I'd like to mention is that we have implemented templates for the File Area. I will explain more on this subject in a separate post.

With all these enhancement, our FileManager behaves almost like the native Windows Explorer and it is available for ASP.NET WebForms as well as MVC!

Viewing all 3389 articles
Browse latest View live