Quantcast
Channel: Infragistics Community
Viewing all 2398 articles
Browse latest View live

How to Enable Column Hiding in Ignite UI for Angular Grid

$
0
0

Ignite UI for Angular Grid is fastest Angular Grid out there.  It does not only run fast, it is also very easy to use igxGrid in your application. Ignite UI for Angular Grid component class is named as igxGrid and on the template it can be used as <igx-grid></igx-grid>

Learn more about Ignite UI for Angular Grid here

In this blog post, let us learn that how Column Hiding can be enabled in IgniteUI for Angular Grid.  

Step 1:  Add Ignite UI for Angular in  Angular Project

There are three ways to add an igx-grid to an Angular project:

  1. If starting a new project, use the Ignite UI CLI to scaffold the project. You can use command line options to add the igx-grid, including dependency installation.
  2. In an existing project, you can use the Ignite UI for Angular Toolbox Extension to add an igx-grid in the project. Learn how in this blog post.
  3. You can use npm to install Ignite UI for Angular dependencies in your project. You can learn that in details here :  Step-by-Step with Images to Add Ignite UI for Angular in an Existing Angular Project

Step 2:  Add igx-grid to an Angular Project

To work with igxGrid, you need to add

  1. igxGridModule
  2. BrowserAnimationModule
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { IgxGridModule } from 'igniteui-angular';

After importing pass these two modules to imports array of Module. Next, to bind with igxGrid, let us create a local data source in the component.

getData() {
    return [
        { model: 'BMW', color: 'Black', price: '20000' },
        { model: 'Audi', color: 'Blue', price: '10000' },
        { model: 'Merc', color: 'Red', price: '25000' },
        { model: 'Toyta', color: 'Green', price: '18000' },
        { model: 'GM', color: 'Blye', price: '10000' },
    ];
}

If you want to learn how to work with REST based API and igxGrid, follow four simple steps to working with Ignite UI for Angular Grid and REST Service

 In the ngOnInit life cycle hook of the component, read data from getData() function as shown in the code listed below. We will  set data source of igxGrid to localData using property binding on the template.

ngOnInit() {
    this.localData = this.getData();
}

Add igxGrid on the template as shown in the code listing below.  We are explicitly configuring columns such that, we can work with column hiding feature.

<igx-grid #grid1 id="grid1" [data]="localData" [autoGenerate]="false">    <igx-column field="model" header="Maker"></igx-column>    <igx-column field="color" header="Color"></igx-column>    <igx-column field="price" header="Price"></igx-column></igx-grid>

In above igxGrid;

  1. Columns are configured manually
  2. Datasource is set using [data] property binding to localData
  3. Since columns are configured manually, autoGenerate is set to false.

At this point on running application, you will get  igxGrid in Angular application as shown in image below:

Step 3:  Enable Column Hiding

Ignite UI for Angular Grid, place column hiding UI in the grid’s toolbar. You can use grid’s tool bar dropdown to show or hide columns.  So first step you need to is set showToolbar of grid to true.

<igx-grid .... [showToolbar]="true" toolbarTitle="Cars" ...></igx-grid>

After setting showToolbar to true, you need to set columnHiding to true.

<igx-grid .... [columnHiding]="true" ...></igx-grid>

By setting combination of showToolbar and columnHiding, you can work with column hiding in igxGrid. Putting everything together,  with column hiding and manual column configuration igx-grid will look like as shown in the code listing below:

<igx-grid #grid1 id="grid1" [data]="localData" [autoGenerate]="false"            [showToolbar]="true" toolbarTitle="Cars" [columnHiding]="true">      <igx-column field="model" header="Maker"></igx-column>      <igx-column field="color" header="Color"></igx-column>      <igx-column field="price" header="Price"></igx-column>  </igx-grid>

 

At this point on running application, you will find igxGrid rendered as shown in the image below:

You can also disable a column from hiding by setting [disabledHiding] property to true. So  you can disable hiding of a columns model as shown in the code listing below:

<igx-grid #grid1 id="grid1" [data]="localData" [autoGenerate]="false"          [showToolbar]="true" toolbarTitle="Cars" [columnHiding]="true">    <igx-column field="model" [disableHiding]="true" header="Maker"></igx-column>    <igx-column field="color" header="Color"></igx-column>    <igx-column field="price" header="Price"></igx-column></igx-grid>

At this point on running application, you will find igxGrid rendered  with model column disabled for hiding shown in the image below:

Besides column, hiding there many IgniteUI for Angular Grid has many features, which make it, best grid for enterprise applications. Check out all features here

Now you have seen that hiding columns is as simple as setting property binding. I hope you find this post useful.

Infragistics Ignite UI for Angular


C# Basics: Delegates

$
0
0

Delegates are one of the most used features of C#.  It allows you to pass a function as of function pointer. It is kind of same as function pointer of C++.

Put simply, delegates are the same as a function pointer of C ++. It refers to another function.  

As noted in Microsoft official documentation:

“A delegate is a type that represents references to methods with a particular parameter list and return type. When you instantiate a delegate, you can associate its instance with any method with a compatible signature and return type. You can invoke (or call) the method through the delegate instance.”

Before get deeper into technical jargon about delegates, let us create first a delegate.

// declaring a delegate        public delegate int AddDelegate(int num1, int num2); // 1        static void Main(string[] args)
       {
           AddDelegate d1 = new AddDelegate(add); // 2            int result = d1(7, 2); // 3           Console.WriteLine(result);
           Console.ReadKey(true);
 
       }
       public static int add(int a, int b) // function        {
           Console.WriteLine(" A Delegate Called me");
           int res;
           res = a + b;
           return res;
 
       }

 

Let us talk through the above code.

  1. Just before main function in comment #1, we are declaring a delegate named AddDelegate. The signature of a delegate is very important, because a delegate can only refer functions matching the same signature.
  2. We created delegate with return type set to integer and it takes two input integer parameters.
  3. In comment # 2, we are instantiating delegate and passing add function as reference.
  4. In comment # 3 invoking the delegate.

On running above, you should get output as shown in the below image:

 One important thing you need to keep in mind is that the signature of delegates must match with the signature of the function pointed by the delegate. Not only signature, but also return type should match.  

Now, I hope you understand how a delegate can be created and used.  Some features of delegates are as follows:

  • Delegates are similar to C++ function pointers:
    • But it is type safe
    • Can encapsulate object instance
    • Can encapsulate method
  • Delegate allows methods to pass as a parameter.
  • Delegates can be chained together.
  • Delegates can be used to define a callback method. For example, you can use it inside an event.
  • Delegates can compile anonymous method and lambda expressions.

You can encapsulate a lambda expression in a delegate as shown in next code listing:

AddDelegate d2 = (a, b) =>
        {
            Console.WriteLine(" delegate lambda expression ");
            int res1 = a + b + 10;
            return res1;
        };
 
        int result2 = d2(10, 20);
        Console.WriteLine(result2);

You will get expected output as shown in below image:

 You can encapsulate more than one function in a delegate using multicast delegate.  You use multicast delegates to assign more than one object to one instance of an object. In other words, you can have more than one subscriber for the same delegate instance, and this is very useful in assigning multiple subscribers to an event.  Consider this next code listing to understand an example of multicast delegates.

    class Program    {
        public delegate void AddDelegate(int num1, int num2);
        static void Main(string[] args)
        {
            AddDelegate d1 = add;
            d1 += add100;
            d1 += (int a, int b) =>
            {
                int res = (a + b) * 1000;
                Console.WriteLine(res);
            };
            d1(10, 20);
            Console.ReadKey(true);
 
        }
        public static void add(int a, int b)
        {
 
            int res;
            res = a + b;
            Console.WriteLine(res);
 
        }
        public static void add100(int a, int b)
        {
            int res;
            res = a + b + 100;
            Console.WriteLine(res);
        }
    }
}

We have created a delegate then added multiple functions to encapsulate in the delegate instance reference.  We are adding functions add, add100, and a lambda expression to the same delegate instance reference.

Now when we call the delegate all these three references will be called, and you will get expected output as shown in the below image. You can use + or – to add or remove an object reference from a multicast delegate.

Delegates have two more important concepts

  1. Covariance
  2. Contravariance

From the beginning of this article, we have been saying that a delegate can refer a method with the same return type and signature, however, variance ease this requirement.  Covariance and Contravariance provide flexibility for matching a delegate type with a method signature.

Covariance permits a method to have a return type that is more derived than that defined in the delegate. Contravariance permits a method that has parameter types that are less derived than those in the delegate type.

To understand covariance, let us create two classes as shown in next code listing:

    public class Animal    {
        protected int age;
        protected void displayAge(int age)
        {
            this.age = age;
            Console.WriteLine(this.age);
        }
    }
 
    public class Dog : Animal    {
        public string color;
        public void displayColor()
        {
            displayAge(99);
            Console.WriteLine(this.color);
        }
    }
}

Dog class inherits Animal class.  So using covariance, a delegate with type Animal can refer Dog type.  We are creating delegate with return type Animal and assigning reference of Dog type in below code listing. This is possible due to covariance feature of delegate.

public delegate Animal AnimalDelegate();
 
static void Main(string[] args)
{
    AnimalDelegate an = newDog;
    an();
    Console.ReadKey(true);
 
 
}
 
static Dog newDog()
{
    Dog d = new Dog();
    d.color = "white";
    d.displayColor();
    return d;
}

 

Like variance, contravariance allows us to work with methods that have parameters of a type that are base types of the delegate signature parameter type. Now I hope you understand delegates in C# and you can use this function in your projects whenever required. Besides the topics covered above, you may also want to check generic delegates.

If you like this article , feel free to check Infragistics Ultimate Product suite here

Ignite UI for Angular 7.2.0 Release (Updated)

$
0
0

The 7.2.0 release could be the biggest for Ignite UI for Angular to date. This release delivers the most significant component yet to make it into the toolkit—Hierarchical Data Grid— as well as major improvements to other commonly used features and components. Version 7.2.0 only includes feature requests that you, our customers, have posted over the last several months. We are committed to your success!

Also, please note that this blog has been updated to reflect other features added as part of the Ultimate 19.1 release, on April 17, 2019.

Hierarchical Data Grid

So let us start this review with the most significant and the largest new component we are releasing—the Hierarchical Data Grid, also known as the Hierarchical Data Table. Using this Data Grid you can display your data in a hierarchical view where you have parent records linked to child tables. Upon expanding a parent row, a number of children data grids appear. You can control features like filtering, sorting, pinning, etc. for each grid separately. The Hierarchical Grid supports multiple child tables under a single parent record without sacrificing any of the performance the flat grid offers. Features like horizontal and vertical DOM virtualization, and paging are applicable to the Hierarchical Grid, as well as to each individual flat grid inside the hierarchical schema of tables the grid is bound to. Samples displaying the Hierarchical Grid can be interacted with here

 

One of the most requested features for the Data Grid has been an Excel-style filtering UI. We heard you, and we are delivering this feature with 7.2.0. This UI doesn’t replace the existing Row-style filtering UI that the Data Grid offers. Rather, you can turn on Excel-style filtering in place of the current row-style filtering. On top of that, the Excel-style filtering UI gives your end-users quick and easy ways to interact with features like Column Moving, Sorting and Column Hiding. All of these UI bits can be toggled, so you can tailor the UI configuration perfectly to the needs of your application, and ultimately your end-users. You can interact with samples displaying the Excel-style filtering here

 

 

Select

With 7.2.0, we completed the set of drop down components Ignite UI for Angular offers. So far, we had a simple Drop Down built on top of the generic Toggle component and the Overlay service the product offers. We also had the most advanced component, which is the Combo. We had quite a few user requests to fill the gap in between. We are now releasing a Select component, which is a form component that mimics the behavior of the native HTML select, but with a much more fluid UX, consistent with the rest of your application. We have strictly followed the Google Material guidelines for this component, and we have made it as device agnostic as native HTML Select. You can interact with samples displaying the Select component here

 

Autocomplete

The other drop down component that Ignite UI for Angular was missing is Autocomplete, which is now featured in version 7.2.0. We have developed an Autocomplete directly, which allows developers to link an input component with a drop down component, and to control what the drop down displays based on the user input in the input field. Samples displaying the Autocomplete directive in action can be interacted with here.

 

Date and Time Picker Enhancements

The Date and Time picker components in previous versions of Ignite UI for Angular offered pop out dialog picker views. With 7.2.0, you can now configure them to be editable input components with drop-down pickers respectively for date and time. Samples displaying the new modes for the Date and Time pickers can be interacted with here.

 

 

Calendar Enhancements

In this release, we have enhanced the Calendar component, by separating its views into separate components. Now you will be able to instantiate a stand-alone month and year view, if your application needs are for end-users to fill only those portions of a date. Samples displaying the separate Calendar view components can be interacted with here: https://www.infragistics.com/products/ignite-ui-angular/angular/components/month_picker.html

Outlined Button

The Ignite UI for Angular Button directive now includes an Outlined button type, which we were previously missing. Samples displaying the different Button types can be interacted with here

 

Theming – Component Elevations and Roundness

The Ignite UI for Angular theming engine now allows you to change the elevation (shadows) and the roundness (border-radius) of individual Ignite UI for Angular components in your application, or the overall roundness factor of a theme applied across your application.

 

Multi-Cell Selection (Ultimate version 19.1)

With Ultimate 19.1, we have included a new major feature called Multi-Cell Selection, also known as Drag Selection. This allow you to select multiple cells in the Data Grid and copy and paste them to another location. Upon selecting the cells with the mouse, you can scroll down, up , left, and right if you hold the right mouse key. The selected cells will stay selected until you apply selection to another cell in the Data Grid.

 You should also notice that we've improved the performance of all scrolling and data operations in the Data Grid, which are visible not only in Chrome but also in IE 11.

Updates to jQuery Grid

Here are some important updates that we added to jQuery Grid in Ultimate 18.1, 18.2, and 19.1 releases. 

  1. jQuery 3.3.x compatibility.
  2. Angular Wrappers support for Angular 7.
  3. React Wrappers support for React 16.
  4. NuGet package now copies static files automatically to wwwroot folder.
  5. Improved TypeScript definitions – added some global functions from Infragistics.util.js file.
  6. Excel Engine improvements - Added support for Chartsheets in the open xml formats.
  7. MVC improvements
    1. MVC Grid Wrapper – developer now can configure the request type.
    2. New Chart options
  8. igSpreadsheet improvements - Added EditText property to the EditModeExiting event arguments.

The full release notes for each version of Ignite UI for Angular are located on GitHub.

Write Your First Program in Microsoft’s Bosque Language—A Step by Step Approach

$
0
0

Microsoft launched a new language called Bosque Language. This is in an experimental phase and designed for writing code that is simple, obvious, and easy to reason about for both humans and machines. This language has TypeScript-like syntax and JavaScript-inspired semantics. 

Some of the main features of the Bosque language are:

  • Improved developer productivity
  • Increased software quality
  • New range of compilers and developer tooling experiences

You can learn more about the Bosque language here.

This article will help you in a step by step manner to configure your system to write your first program in Bosque language. Let’s get started.

Step 1

Download and install LTS version of Node.js from here: https://nodejs.org/en/download/. Once Node.js is installed, run the following command to confirm it was installed.

node –v 

Step 2

After making sure that Node.js is successfully installed, next install TypeScript using npm. To do that run the below command,

npm i typescript -g

You should get a message like the one above upon successful installation of TypeScript.

Step 3

After installing TypeScript, navigate to the Github repository of Bosque language at the below URL,

https://github.com/Microsoft/BosqueLanguage

From here, either download or clone the repository. Once repository is downloaded, unzip it and save at any location of your choice. Change directory to Bosque language master folder and then to folder ref_impl.

In this folder run the following command,

npm install && npm run-script build && npm test

After successfully running the command, you should get output that test passed as shown in the next image,

You have now configured your environment to write your first program in the Bosque language.

Step 4

In this step, we’ll add an extension to Visual Studio Code for syntax highlighting. As of now extensions are not available in the Code Extension Marketplace and we have to manually add them. To do that copy bosque-language-tools folder from bosquelanguage-master folder and copy to C:\Users\username\.vscode\extensions folder. 

Write Your First Program

Create a file with extension .bsq to write a program in it.  I have created a file called hello.bsq

hello.bsq

namespace NSMain;
 
function add2(xIntyInt): Int {
    return x + y;
}
 
entrypoint function main(): Int {
    var result = add2(7, 12);
    return result;
}

A basic Bosque language program should have the following rules:

  • It must have at least one namespace with the name NSMain. Keep in mind that NSMain is keyword.
  • It must have one entrypoint function main. Both entrypoint and main are the keywords.

Update : After writing this, I got a tweet reply from creator of Bosque language that they will give more options to configure namespace and entrypoint in the future .

 In the above program, we have created the add function and called it from the main function. You can run your first Bosque program with below command. I have saved code file with name hello.bsq in C drive.

node bin/test/app_runner.js c:\\hello.bsq

As you see we are getting output, 19 printed.  Congrats, you just compiled your first program in the Bosque language. You can learn about other features of the language here

In further posts, we will discuss other features of the Bosque language.  If you find this post useful, do not forget to check Infragistics award winning product suites here

Ignite UI for Angular Gains New Spreadsheet Control with Ultimate Release 19.1

$
0
0

Along with the many other new controls and features in the newest release of Ultimate 19.1, we’ve added the much-anticipated new Spreadsheet component to Ignite UI for Angular.

The IgxSpreadsheet is a Microsoft Excel inspired component that gives you the ability to embed Excel document creation and editing experiences directly into your Angular applications. The IgxSpreadsheet is built on top of our existing Excel Library, and provides an interactive control to our robust Excel document capabilities. With powerful editing and cell formatting features, the IgxSpreadsheet brings the familiarity of Excel into your customer’s apps.  With just a few lines of code, you can now create, open, edit, and secure Excel documents without ever having Microsoft Excel installed on your machine.

Let's take a moment to talk about some of the great features in the new IgxSpreadsheet Angular component.

Formula Bar

Probably the most iconic feature of Excel is the formula bar. As you may already know, formulas refer to equations that compute calculations based on the values entered in a spreadsheet. A simple formula can be created using calculation operators and constants. A formula must include a cell reference and begin with the "=" character. An example of a simple formula is "=B2+B3". More complex formulas contain functions; for example, "=SUM(B2:B3)". With support for over 300+ formulas, the IgxSpreadhseet's formular bar gives you the ability to view, create, and edit formulas within your worksheet with the same familiar experience you have in Microsoft Excel.  

The name box of the formula bar also allows the user to define named references (to cell or cell ranges) and quickly navigate to the appropriate cell or cell range(s). 

Worksheet Filtering

As you would expect, you can filter on one or more columns of data. With filtering, you can control not only what you want to see, but what you want to exclude. You can filter based on choices you make from a list, or you can create specific filters to focus on precisely the data that you want to see.  You can filter by a numeric value, text values, font colors, icons, or filter by color for cells that have color formatting applied to their background or text.

Not only that, but we provide some built-in filter options based on the underlying data format. For example, if filtering based on a date, you will be provided a number of date-based filter choices:

Worksheet Sorting

Besides having excellent filtering support, we also have sorting support.  The sort menu item will set the sort of the associated column based on the value/state of the active cell for which the menu was shown. So choosing Sort A to Z will create an ascending value sort for that column.

AutoFilter Support

Even with all those tremendous built-in sorting and filtering features accessible from a simple context menu, we also have AutoFilter support.  This means that now the headers of a worksheet table, and the header cells of the worksheet level filtering region, will display a drop-down button that displays the filter-related menu.  The buttons show the sort and filter state and the tooltip displays a friendly description of the filter for that column. The menu displays various options for sorting and filtering. The filter options displayed are dependent on the data types in the column as they are in excel. So you’ll see one of the number filters, text filters, or date filters available depending on the data in the table column.

Conditional Formatting

Conditional formatting allows you to automatically apply formatting—such as colors, icons, and data bars—to one or more cells based on the cell value. To do this, you'll need to create a conditional formatting rule. For example, a conditional formatting rule might be if the value is less than $2000, color the cell red. By applying this rule, you would be able to quickly see which cells contain values less than $2000.  Pretty basic stuff right?  Well, the best part is that the Spreadsheet supports rendering all conditional formatting features available in Microsoft Excel.   Microsoft Excel has several predefined styles—or presets—you can use to quickly apply conditional formatting to your data. They are grouped into three categories:

Data Bars are horizontal bars added to each cell, much like a bar graph

Color Scales change the color of each cell based on its value. Each color scale uses a two- or three-color gradient. For example, in the Green-Yellow-Red color scale, the highest values are green, the average values are yellow, and the lowest values are red.

Icon Sets add a specific icon to each cell based on its value.

Data Validation

The Spreadsheet has support for data validation.  You can easily validate cell values, provide tooltips, and show error messages based on invalid values.

Cell Dropdowns

We have also added the ability to show a dropdown list in a cell populated with data from the values immediately above and below the active cell. One way to show this cell drop-down is via the context menu for a cell using the “Pick From Drop-down List…” item, and the other is by pressing Alt+Down.  You’re not explicitly defining the contents of the list as you do with a list data validation – it’s implicitly populated based on the cells above/below in the same manner as Excel.  As with Excel it ignores numerical values, stops at blanks and table boundaries, etc.

Deselect a Selection

Sometimes when you're selecting multiple cells or ranges in Excel, you accidentally select one or more that you didn't intend to. Using the Deselect Feature, you can deselect any cells within the selected range. Pressing the Ctrl key, you can click, or click-and-drag, to deselect any cells or ranges within a selection. If you need to reselect any of those cells, continue holding the Ctrl key and reselect those cells.

So you get an overlay like this when you hold ctrl and mouse/press down on a selected cell:

And releasing results in:

Let's Wrap this Baby Up!

As you can see, the IgxSpreadsheet is an extremely powerful component that essentilly takes Microsoft Excel and packages it up into a nice little Angular component for you to use inside your Anglar applications. Keep in mind, we only managed to talk about just a handful of features that the IgxSpreadhseet provides.  There are many more that we didn't have time to cover including creating worksheets and tables, shapes, splitting panes, resizing, zooming, hyperlinks, protecting worksheets, freezing panee, fonts styles, etc.  You get the idea. There is a lot to this component and the best way to learn everything it can do is to try it out for yourself.  Now would be a good time to head on over to the Ignite UI for Angular product page, download the product, and start using the IgxSpreadsheet component. Trust me, you'll be glad you did.

As I always like to point out, if you have ideas about new features we should bring to our controls, important issues we need to fix, or even brand new controls you’d like us to introduce, please let us know by posting them on our Product Ideas website.  Follow and engage with us on Twitter via @infragistics. You can also follow and contact me directly on Twitter at @brianlagunas.  Also, make sure to connect with our various teams via our Community Forums where you can interact with Infragistics engineers and other customers.  

Lastly, when you do build something cool with our controls, please make sure to let me know.

What’s New in 19.1: Ultimate UI for Windows Forms

$
0
0

Starting in our 18.1 Ultimate UI for Windows Forms release, we aimed to provide the most complete Microsoft Excel & Spreadsheet solution for .NET application development. Now, in our 19.1 release, we continue to achieve that goal by bringing the power of Excel Charting directly into your WIndows Forms applications.

Let’s take a look at what we’re shipping in Infragistics Ultimate for Windows Forms 19.1.

Excel Library

As you know, we have been putting a lot of effort into our Excel Library and Spreadsheet control for a few releases now.  Our customers have let us know just how important these are to their day-to-day business. Due to this demand, we have doubled down on our efforts and are working towards finishing out our Excel Charting feature set. The Excel Library now has the ability to create combination charts. What is a combination chart? Well… it’s quite simple. It’s a single chart that has two or more chart types within it.

In Excel, you would add a combination chart as follows:

You can now do the same thing using our Excel Library with just a few lines of code.

Open the newly created document in Microsoft Excel, and BOOM! You have your combination chart.

Spreadsheet

You have been able to create charts using the Infragistics Excel Library since 18.2. It only makes sense that our goal for the Spreadsheet control in 19.1 was to render those amazing charts. I am happy to announce that you can consider it done! As of 19.1, you can now load any Excel document containing a chart and we will render it.

Rendering charts is a breeze!  Let’s take the combination chart we created using the Excel Library earlier in this post.  We’ll load that same document using our brand new Spreadsheet Chart Adapter.

Start by adding a reference to the Infragistics4.Win.UltraWinSpreadsheet.ChartAdapter.v19.1.dll to your existing Windows Forms application.

Now, modify your code and provide a new SpreadsheetChartAdpater as follows:

Add some code to load your Excel document:

Run your app, load a document, and BOOM! Charts!

Do you know what the best part is? If you make a change to the data, the chart will update it’s rendering to reflect the changes in data. How freaking cool is that!

Let’s Wrap this Baby Up!

As I always like to point out, if you have ideas about new features we should bring to our controls, important issues we need to fix, or even brand new controls you’d like us to introduce, please let us know by posting them on our Product Ideas website.  Follow and engage with us on Twitter via @infragistics. You can also follow and contact me directly on Twitter at @brianlagunas.  Also, make sure to connect with our various teams via our Community Forums where you can interact with Infragistics engineers and other customers. 

If you are not using our Windows Forms controls yet, remember that a free evaluation download is only a click away.

Lastly, when you do build something cool with our controls, please make sure to let me know.

What’s New in 19.1: Ultimate UI for WPF

$
0
0

Every developer knows that technology moves fast, and sometimes it can be difficult to keep up.  Just when you think you have it all figured out, something changes and you have to change direction to adapt and stay current. That is exactly what we are doing with this latest release of Infragistics Ultimate for WPF in our newest 19.1 release. Here at Infragistics, we do our best to stay up to date with the latest technology stacks that our customers are moving to for their development requirements, while at the same time maintaining our mature and established products and features. The theme for our 19.1 release of Infragistics Ultimate for WPF is adapt and complete.  We have adapted to the brand new .NET Core 3 framework release from Microsoft, and we are completing the charting work for the Excel Engine and Spreadsheet control.

Let’s take a  look at what we’re shipping in Infragistics Ultimate for WPF 19.1.

.NET Core 3 Support

As you may have heard, Microsoft has recently release a preview of their brand new .NET Core 3 framework that has support for WPF and Windows Forms.  This is actually a huge innovation for desktop development, and will help rejuvenate the desktop platform.  Normally, we would wait until a new framework has reached closer to an RTM status before supporting it. As you know, preview software is normally riddled with bugs, and open to breaking changes. The number of customers asking for this feature was quite amazing.  The interest was so strong,  we recognized the importance of .NET Core 3 for our customer base, and dropped nearly our entire backlog in order to provide support for it. It’s a big risk, but a risk we took. We think it will pay off. Not only for us, but for our customers as well.  Here are just a few of the benefits our customers will get by moving their WPF apps to the .NET Core 3.

  • Performance! .NET Core 3 apps will run approx. 30% faster than apps running on the .NET Framework.
  • You no longer require your customers to have a specific version of the .NET Framework installed. Your app ships with everything it needs to run. Your customers no longer care about having a "prerequisite" framework installed in order to use your app. This is a big deal in the enterprise. 
  • Support for the .NET Core CLI tools and SDK-style projects in Visual Studio. This makes creating and maintaining apps, as well as implementing CI and DevOps processes so much easier. 
  • Side-by-side installations. You can have all your WPF apps targeting different versions of .NET Core 3, and they can all run independently of each other.
  • You will be able to deploy your app as a single EXE. All your assemblies will be linked (code removed that isn't used), and then bundled together.
  • You can expect updates to WPF/WinForms at a much faster cadence as these updates no longer have to be released with an OS update.
  • Access to the full Windows 10 (AKA “WinRT”) API.
  • Ability to host UWP controls in WPF and Windows Forms applications, enabling modern browser and media content and standards.
  • Innovation will occur in .NET Core 3, not in the .NET Framework.

Now I know what you’re going to ask me, “this is great Brian, how do we get the .NET Core 3 controls?”. Great question!  You get them via our NuGet packages. You can use your local NuGet feed, or the Infragistics NuGet feed. When you add an Infragistics Ultimate for WPF control to your .NET Core 3 application, you will automatically get the .NET Core 3 version of that control. It’s that easy!

It’s obvious that the .NET Core 3 is the future of WPF, and Infragistics is ready to help take you there.

Excel Library

As you know, we have been putting a lot of effort into our Excel Library and Spreadsheet control for a few releases now.  Our customers have let us know just how important these are to their day-to-day business. Due to this demand, we have doubled down on our efforts and are working towards finishing out our Excel Charting feature set. The Excel Library now has the ability to create combination charts. What is a combination chart? Well… it’s quite simple. It’s a single chart that has two or more chart types within it.

In Excel, you would add a combination chart as follows:

You can now do the same thing using our Excel Library with just a few lines of code.

Open the newly created document in Microsoft Excel, and BOOM! You have your combination chart.

XamSpreadsheet

You have been able to create charts using the Infragistics Excel Library since 18.2. It only makes sense that our goal for the xamSpreadsheet in 19.1 was to render those amazing charts. I am happy to announce that you can consider it done! As of 19.1, you can now load any Excel document containing a chart and we will render it.

Rendering charts is a breeze!  Let’s take the combination chart we created using the Excel Library earlier in this post.  We’ll load that same document using our brand new xamSpreadsheet Chart Adapter.

Start by adding a new NuGet package to your existing WPF application named Infragistics.WPF.Spreadsheet.Charts,or the Infragistics.WPF.Controls.Grids.XamSpreadsheet.ChartAdapter.dll if you’re not using NuGet.

Now, modify your xamSpreadsheet XAML and provide a new ChartAdpater as follows:

Add some code to load your Excel document:

Run your app, load a document, and BOOM! Charts!

Do you know what the best part is? If you make a change to the data, the chart will update its rendering to reflect the changes in data. How freaking cool is that!

Let’s Wrap this Baby Up!

As I always like to point out, if you have ideas about new features we should bring to our controls, important issues we need to fix, or even brand new controls you’d like us to introduce, please let us know by posting them on our Product Ideas website.  Follow and engage with us on Twitter via @infragistics. You can also follow and contact me directly on Twitter at @brianlagunas.  Also, make sure to connect with our various teams via our Community Forums where you can interact with Infragistics engineers and other customers. 

If you are not using our WPF controls yet, remember that a free evaluation download is only a click away.

Lastly, when you do build something cool with our controls, please make sure to let me know.

What's New in Ignite UI for React 2019 April Release

$
0
0

We announced the launch of Ignite UI for React in February (see our general overview blog). Since then, we've noted a lot of enthusiasm from our users for our React components, and our dev team has been working very hard to add new values to the React library.

Today, I am very excited to share new features included in this release!

This 2019 April release includes the following updates:

  • Interaction features to the Fastest React Grid
  • Stacked Chart Series to the React Chart
  • New Map control

Interaction Features to the Fastest React Grid

Selection - React Grid

In this release we focused on interaction features such as selections and navigation to enhance the end-user experience. With this update, you can interact with cells as if you are using Microsoft Excel.

Multi-Cell Selection (Contiguous and Non-Continguous)

This feature allows you to select individual cells or a contiguous group of cells. This is done by clicking each cell while holding down the CTRL or SHIFT key.

Cell Range Selection (Mouse / Keyboard)

This feature allows you to select a range of cells using the mouse or the keyboard. Ranges are selected in the following ways:

  • Mouse drag– Select a cell with the mouse click, drag, release the mouse over another cell, and the range from the selected cell and released cell will be the selected range.
  • CTRL and Mouse drag– Hold the CTRL key while using the mouse to create another range will keep individual ranges selected.
  • SHIFT and Click– Select a cell, hold the SHIFT key, select another cell, and the range of cells between the two selected cells will be selected.

Active Cell (Excel-Style Keyboard Navigation)

We also added Excel-style keyboard navigation to change the active cell.

Key(s)Action(s)
EnterNothing happens.
Arrow Key UpNavigate one cell up (no wrapping).
Arrow Key DownNavigate one cell down (no wrapping).
Arrow Key LeftNavigate one cell left (no wrapping between lines) on the current row only.
Arrow Key RightNavigate one cell right (no wrapping between lines) on the current row only.
Page UpScroll one page (view port) up.
Page DownScroll one page (view port) down.
TabMove the selection to next cell or next row if the last cell is reached (without row selection).
SHIFT + TabMove the selection to previous cell or previous row (last row cell) if the first cell is reached.
CTRL + Arrow Key UpMove to top cell in column.
CTRL + Arrow Key DownMove to bottom cell in column.
CTRL + Left Arrow KeyMove to leftmost cell in row.
CTRL + Right Arrow KeyMove to rightmost cell in row.
CTRL + HomeMove to top left cell in the grid.
CTRL + EndMove to bottom right cell in the grid.
Mouse scrollFocus is blurred.

New Stacked Series to the React Chart

Stacked Charts are commonly used to render a collection of data points. A stacked chart can present a direct representation of the data or it can present the data in terms of percent of the sum of all values in a data point.

In this release, we added a variety of stacked series to DataChart, including area, bar, column, line, spline area, and spline.

Stacked100 Stacked
Stacked Area Series
Stacked 100-Area Series
Stacked Bar SeriesStacked 100-Bar Series
Stacked Column SeriesStacked 100-Column Series
Stacked Line SeriesStacked 100-Line Series
Stacked Spline Area SeriesStacked 100-Spline Area Series
Stacked Spline SeriesStacked 100-Spline Series

New Map Control

You may think "Hey Infragistics, you guys added features to existing controls only. No New Control, eh?". Don't worry, we added a new Map control that can visualize geographic and geo-spatial data. With this control, you can show the status of occupations for a meeting or show an airplane route map with real time flight data.

Shape File Converter

In the Map control, the ShapefileConverter class loads geo-spatial data from shape files and converts it to a collection of ShapefileRecord objects. Geographic series can be bound to this collection and render geo-spatial data.

Data Binding

In addition to rendering data from shape files and geographic imagery maps, the React Map control also provides data binding to other data sources with geographic data using the data binding and data mapping properties of geographic series. The following is a preview of the Map control with GeographicSymbolSeries bound to a data model that contains locations of some cities of the world.

High-Performance Rendering

The React Map control provides plotting of tens of thousands of data points and updates them every few milliseconds so that the control can handle your real-time feeds.

High Performance Rendering

Geographic Imagery Maps

This control provides the rendering of geographic imagery from Open Street Maps. 

Geographic Series

Use this control to render an unlimited number of geographic series that can display geo-spatial data as points, polylines, and polygons. Multiple geographic series can be used to create a complex layering of map elements; e.g. states, cities, and roads. The Map control’s Series property is used to support rendering an unlimited number of geographic series. This property is a collection of geographic series objects and any type of geographic series can be added to it. For example, GeographicSymbolSeries can be added for plotting geographic locations such as cities and the GeographicPolylineSeries for plotting connections (e.g. roads) between these geographic locations.

Geographic Series Types

For Geographic Series, the map control provides these types below plus many more:

Scatter Area Series
Geographic Scatter Area Series
Scatter Bubble Series
Geographic Scatter Bubble Series
Contour Line Series
Contour Line Series
High Density Scatter Series
High Density Scatter Series

Scatter Symbol Series
Scatter Symbol Series

 Shape Polygon Series
Shape Polygon Series

Shape Polyline Series
Shape Polyline Series


You can also customize maps with the Shape/Marker Templates.

Map Navigation

The React Map control provides customizable navigation behaviors for navigating map content using the mouse, keyboard, or code-behind. The following is a preview of the map control with highlighted position and size of the WorldRect when zoomed to some region of the map content (e.g. Africa and Europe continents).

Get started with Ignite UI for React

To get started with Ignite UI for React, you can visit the product page and browse online samples. You can also download a project that includes samples that can run on your local environment with npm packages.

Happy Coding!


Announcing Infragistics Ultimate 19.1 [Updated April 2019]

$
0
0

With today's launch, we are very excited to get our latest Ultimate 19.1 release into your hands. Ultimate 19.1 continues our key themes: giving you the best of breed UI controls & components for modern web development, the best Excel & Spreadsheet capabilities in the market for any platform, and continued investment in WPF & Windows Forms. This huge release has something for everyone.

I'll give you the highlights in this blog, with links at the end to more details blogs and live online demos.

The Complete Microsoft Excel Library Solution

With this release, we can safely say we offer the most complete Spreadsheet & Excel Library for all of the platforms you most care about. Angular, React, jQuery, WPF, and Windows Forms all have feature-parity in the features and functions of the Excel Library. Read, write, and create Excel documents, visualize data with charts and sparklines, apply conditional formatting, create tables with filtering and sorting, and use any of the 300+ formulas in your worksheets to expand the capability of your apps with our Microsoft Excel Library. With these capabilities, you can offer an entire Excel experience without needing Excel on the client machine!

Pixel-Perfect Excel Spreadsheet Experience

New to Angular in this release, Infragistics Spreadsheet allows an almost exact experience of Microsoft Excel – embedded in your own Angular, jQuery, WPF or Windows Forms apps. Built on top of our Excel Library with support for reading / writing Excel 97 and higher file formats (including XLXS), enjoy the UI interactions that your users have become accustomed to in Microsoft Excel. Capabilities include Conditional Formatting, Format Cells Dialog, Worksheet Filtering, Worksheet Sorting, Table Support (Editing, Copy / Paste, Tab Support, Total Row), List Data Validation, Cell Dropdown support and much, much more.

In the next few months, you'll see the same Spreadsheet control in React, so if you are a React developer looking for a robust React Spreadsheet solution, stay tuned!

Dashboards & Analytics with Charting in Excel

Visualize your app data in Excel or embed Charts in your XAML or Windows Forms spreadsheet control. With the Excel library, you can create charts in Excel based on data that exists in Worksheets, or you can create dynamic reports that include data plus data visualizations from any app—be it Angular, React, jQuery, WPF or Windows Forms. If you are just using the spreadsheet control in WPF or Windows Forms, you can create charts directly in the control with our new API. We'll be adding this capability to Angular and React soon!

Angular Grid, Spreadsheet, Charting & More

Last month we released a massive set of new features in Angular—but we aren't slowing down in 19.1. This release includes the much anticipated Spreadsheet Control, with over 25 interactive features including all of the formatting and formula capabilities from the Excel library.

Along with Angular Spreadsheet, we are shipping a massive number of new Angular charts with over 60 new Chart types and new Series types, which gives our market-leading Angular Chart 100% feature parity with the core series types that we ship in WPF, Windows Forms, React & jQuery. This release includes these Series types:

  • Category Series
  • Financial Series
  • Polar Series
  • Radial Series
  • Range Series
  • Scatter Area Series
  • Scatter Contour
  • Scatter Bubble Series
  • Scatter Marker Series
  • Scatter Shape Series
  • Stack / Stacked 100

Along with last month's Angular release of the new Angular Hierarchical Grid in Angular, and one of the best Excel Style Filtering experiences in any grid I've ever seen, we're putting a ton of amazing native Angular capability into your hands.

React Grid Features & Geospatial Maps

React continues to get a ton investment. We've shipped 2 major releases in the last 4 months, and this release continues to impress with new React Grid features, new Charts and a new Geospatial Map control.

React Chart is now at the same feature parity level as all of our other platforms. There is over 60 new Chart types and new Series types, so it is the same story as Angular Chart—100% feature parity with the core series types that we ship in WPF, Windows Forms & jQuery.

The new React Map control has all of the benefits you've enjoyed in the WPF & jQuery map control, It provides support for all major series types, including ESRI Shape File, multiple Map Tile providers, and the High-Density Series which can handle millions of data points plotted over a geospatial map.

.NET Core 3 Support + Visual Studio 2019

With 19.1, we are shipping full support for the Preview Releases of .NET Core 3 and the RTM version of Visual Studio 2019. Arguably the biggest release of .NET since its inception, .NET Core 3 brings a huge improvement in what developers can achieve with a smaller, lighter-weight .NET Framework. Modernize your desktop applications with .NET Core 3 and gain better performance, work with the latest .NET Core CLI tools and SDK-style projects in Visual Studio, code against the latest C# 8 language features, take advantage of XAML islands, provide side-by-side deployments, and more.

As Microsoft continues to improve .NET Core 3 on their march towards GA (General Availability) / RTM in the fall, we'll continue to test and address issues with their betas and our controls to ensure your path to .NET Core 3 is seamless.

Indigo.Design Professional

This year, you can expect a lot of excitement in both major updates and major new features in Indigo.Design. On top of this release, we have releases planned for early summer, early fall and late fall—all with amazing new capabilities that are 100% based on the volumes of feedback we've received in the last several quarters since we launched Indigo.Design. For 19.1, we are shipping an update to the On-Premise version of Indigo.Design, which includes all of the Image-Based Prototyping features, as well as updates to the Sketch plugins for Cloud Sync and Publish. If you are on On-Premise customer, or interested in On-Premise Indigo.Design Professional, this release gets you all of the core cloud features for local deployment within your firewall.

Wrap Up

Ultimate 19.1 is a big release, with feature value driven by all of your feedback. To get specific details on each platform's features and to check out the samples, here is a summary of links that will get you started.

Angular Blog: What's New in Ignite UI for Angular

Angular Live Online Samples

React Blog: What's New in Ignite UI for React

React Live Online Samples

Blog: What's New in Ultimate UI for WPF

Blog: Ultimate UI for Windows Forms

Indigo.Design Home

As usual, we need to hear what you have to say, so please shoot me an email at jasonb@infragistics.com and let me know how we can help you to continue to deliver value to your customers with Infragistics.

Thanks and Happy Coding!

Jason

Host Sketch Prototypes on Private Server with Usability Testing

$
0
0
Indigo.Design lets you sync Sketch prototypes and run unmoderated usability testing securely on your own private server.(read more)

Ignite UI for Angular 7.3.0 Release

$
0
0

With the 7.3.0 we release we are introducing some new and interesting features that will allow our user to expand the usability of the igxGrid. The two major things we are introducing are the Multi Row Layout and the Row Dragging feature.

Multi Row Layout

Multi-row layouts allow developers to create intricate cell arrangements within the same row by defining a template layout that is applied to header and body cells. This provides flexibility of the arrangement and makes it possible to create responsive web apps where grids would adapt and avoid horizontalcoo scrolling when the available space becomes too narrow

The igxGridComponent now supports Multi Row Layout It which can be configured with the newly added IgxColumnLayoutComponent and the columns in it. IgxColumnComponent now expose four new fields to determine the size and the location of the field into the layout:

  • rowStart
  • colStart
  • rowEnd
  • colEnd
 
 
Row Dragging 

The Drag and Drop allows users to Row drag and pass the data of a grid record on to another surface, which has been configured to process/render this data in a particular way. This is a very useful feature in cases when we have two or more Grids and we won’t to move the row date from one grid to the other. For more details on the feature visit the WIKI pages n Github or the samples on the website (Link)

Additional Enhancements 

There are also a couple of new enhancements to our already released features like igxTreeGird now support load children on demand  and haschildrenkeys input properties.

The IgxListComponent now provides the ability to choose a display density from a predefined set of options: compact, cosy and comfortable (default one). It can be set by using the displayDensity input of the list.

The igxButton now provides the ability to choose a display density from a predefined set of options: compact, cosy and comfortable (default one). It can be set by using the displayDensity input of the button directive.

The Excel Style Filter dialog and its sub-dialogs now have a display density based on the displayDensityinput of their respective grid; the igxDropDown now supports virtualized items. 

Check out our RoadMap and give a star to our Github repo to stay tuned.

 

Infragistics Team visits South Korea again this year!

$
0
0

I am excited to announce the Infragistics Developer Day in South Korea this year again!

Jason Beres, Sr. VP of Developer Tools, Ken Azuma, Managing Director for APAC, and Satoru Yamaguchi, Senior Solution Consultant will be visiting Seoul, and they are going to host workshops for WPF, ASP.NET MVC & JavaScript controls.

Event Overview:

Host

Infragistics, Inc. / BluePort

Date

Three seminars:
- June 26th, 2019 09:00 am to 12:00 pm
- June 26th, 2019 02:00 pm to 05:00 pm
- June 27th, 2019 09:00 am to 12:00 pm

Location

BluePort seminar room

http://www.blueport.co.kr

12F, 5, Seocho-daero 78-gil, Seocho-gu, Seoul, Republic of Korea

Capacity

Morning Session (8:30 am to 12:00 pm) - 30 people

Afternoon Session (1:30 pm to 5:00 pm) - 30 pooeple

Admission Fee

Free

Contact: BluePort (02-567-8920 / sales@blueport.co.kr)

* We provide English to Korean translation.

You can find a detailed schedule and agenda here (Korean).

Registration:

Please pick one of them or sign up for each if you're attending multiple workshops. 

June 26, 2019 - Morning Session - WPF

June 26, 2019 - Afternoon Session - ASP.NET MVC + JavaScript

June 27, 2019 - Morning Session - WPF

We are looking forward to seeing you all in Korea!

Related: Infragistics Developer Day 2018 Recap

Add a range selector calendar in Angular: a step by step guide

$
0
0

In the first week of May, I attended ngConf 2019 and I had the wonderful opportunity to talk to many Angular developers about Ignite UI and Angular in general.

Developers were very impressed by Ignite UI for Angular, which includes an Angular Material-based library consisting of more than 80 components, directives, and services to help you build Angular enterprise applications faster. You can learn more here

One question I was asked frequently:  How to select a date range in a Calendar. In this blog post, I’ll show you how to do that.  You need to use Ignite UI for Angular igx-calendar component  to add a calendar in the application. The igx-calendar component comes in three selection modes

  1. Single
  2. Multi
  3. Range

I’ll use a step-by-step approach to show you how to use igx-calendar in an Angular application.

Step 1:  Add Ignite UI for Angular in Angular Project

There are three ways to add an Ignite UI  to an Angular project:

  1. If starting a new project, use the Ignite UI CLI to scaffold the project. You can use command line options to add the igx-calendar, including dependency installation.
  2. In an existing project, you can use the Ignite UI for Angular Toolbox Extension to add an igx-calendar in the project. Learn how in this blog post.
  3. You can use npm to install Ignite UI for Angular dependencies in your project. You can learn that in details here :  Step-by-Step with Images to Add Ignite UI for Angular in an Existing Angular Project

Step 2:   Add required modules for igx-calendar

To work with igx-calendar, you need to add IgxCalendarModule and BrowserAnimtaionModule.  We will display messages in the igx-dialog, so for that purpose we have also added IgxDialogModule

 Modules can be added as shown in the code listing below:

import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { IgxCalendarModule, IgxDialogModule } from 'igniteui-angular';
import { AppComponent } from './app.component';
 
@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        IgxCalendarModule,
        IgxDialogModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

 

I have added dependencies in the AppModule, however you can add in it any other features.

Step 3:   Use igx-calendar

You can simply use igxCalendar in the component template as shown in the listing below:

<igx-calendar selection="range" (onSelection)="verifyRange($event)">  </igx-calendar >

There are three selection modes available for the calendar. They are as follows:

  1. Single
  2. Multi
  3. Range

By default, the selection is set to single. To work with date range selection, we have set selection property to range.  When the user selects date onSelection, an event will be fired.  In the event handler, you can work with the selected date range, verifying the range, among other options.

Let us also add igx-dialog component to display messages.

<igx-calendar #calendar selection="range" (onSelection)="verifyRange($event)">   </igx-calendar>   <igx-dialog #alert title="Notification" message="You have selected date" leftButtonLabel="OK"               (onLeftButtonSelect)="alert.close()">   </igx-dialog>

 Note that I have added temp ref variables to both components such that we can read them in the component class.

Step 4:   Reading calendar in component class

Like any other element or component of a template, you can read igx-calendar using ViewChild decorator.

Simplifying ViewChild and ContentChild in Angular

 Start with importing IgxCalendarComponent   and IgxDialogComponent,

import { IgxCalendarComponent, IgxDialogComponent } from 'igniteui-angular';

 Create properties decorated with @ViewChild reading the temp variable name as shown below: 

@ViewChild('calendar') public calendar: IgxCalendarComponent;
@ViewChild('alert') public dialog: IgxDialogComponent;

Now you can read all properties and events of IgxCalendarComponent and IgxDialogComponent in appropriate life cycle of component class such as ngAfterViewInit

 

Step 5:   Handle date selection event

You can handle a date selection event as shown in the next listing :

verifyRange(dates: Date[]) {
 
    if (dates.length > 5) {
        this.calendar.selectDate(dates[0]);
        this.dialog.message = this.calendar.value[0];
        this.dialog.message = 'select at max 5 dates';
        this.dialog.open();
    } else {
        this.dialog.message = 'You have seleceted start date :' + dates[0] + ' end date :' + dates[dates.length - 1];
        this.dialog.open();
    }
 
}

IgxCalendarComponent returns single date object for default value and for range selection it returns date type object array. You can work with returned array like pure JavaScript date object array as per your need.  I am reading the length of the array and, if it is more than 5, I am passing different messages in igx-dialog. If it’s less than 5, I’m passing start and end date.

That’s it. As you can see, it’s quite simple to work with date range selections in Angular applications using igx-calendar component.  You may also want to explore other components in the Ignite UI library  to build an enterprise Angular application faster.

Formatting Data using Pipes in the Ignite UI for Angular Grid

$
0
0

How you present data to the user is essential. Often you cannot present data as it is from the data source to the viewer. Users need a more immersive presentation of the data. Let us consider a data source as listed below:

this.products = [
    { Id: '1', Title: 'Book', ExpiryDate: new Date(), Price: 35, Rating: 3.5 },
    { Id: '2', Title: 'Pen', ExpiryDate: new Date(), Price: 25, Rating: 4.0 },
    { Id: '3', Title: 'Pencil', ExpiryDate: new Date(), Price: 20, Rating: 3.2 },
    { Id: '4', Title: 'Bat', ExpiryDate: new Date(), Price: 135, Rating: 4.0 },
    { Id: '5', Title: 'Ball', ExpiryDate: new Date(), Price: 65, Rating: 3.8 },
];

Let’s begin by defining an instance of the igxGrid in the template and data bind the data property to the product array. It is straightforward to add Ignite UI for Angular Grid as shown in the below code listing:

<igx-grid [data]="products"          [autoGenerate]="true"          width="960px"></igx-grid>

We are setting the autoGenerate property to true; do to this, Ignite UI will auto-generate all the columns by reading from the data source.  The grid will be created as shown in the below image:

As you can see,  data is displayed in a much more immersive way. Also, you may notice that Ignite UI by default has applied date pipes to the ExpiryDate column. If you are new to pipes, Angular pipes take data as input and transforms it into your desired output. The angular library provides many built-in pipes:

  • UpperCasePipe
  • LowerCasePipe
  • CurrencyPipe
  • PercentPipe
  • DatePipe etc.

When you use auto generate true, Ignite UI applies DatePipe on the date object column, without it ExpiryDate will be rendered as shown in below image:

 So, in autogenerate true, Ignite UI applies required pipes on the data, but still, there is some limitation of it. For example, you cannot use custom pipes or manually choose which pipe to be applied.

For better control of columns, you should configure them manually in IgxGrid.  If you want to format the style or data of a particular column, for example, you have to manually configure columns in igxGrid as shown in the code listing below and then use column template.

<igx-grid [data]="products" [autoGenerate]="false" width="960px">        <igx-column field="Id" header="Id"></igx-column>        <igx-column field="Title" header="Title"></igx-column>        <igx-column field="ExpiryDate" header="Expiry Date"></igx-column>        <igx-column field="Price" header="Price"></igx-column>        <igx-column field="Rating" header="Rating"></igx-column> </igx-grid>

For a particular column, now you can configure header, column properties, and data format. Say you want to apply currency pipe to Price column, you can do that as shown in the code listing below:

The ng-template is like an HTML template and reusable, and it replaces the content when rendered. You can use ng-template to provide

  1. Column template
  2. Header template
  3. Pagination template etc.

We are passing two parameters to ng-template

  1. ixgCell : determines that this template will be applied to a particular grid cell
  2. let-value : contains data value passed in the cell

Other possible input parameters for ng-template are

  1. igxHeader : to apply template to column header
  2. let-column : contains column as input data

We will talk about these in detail in another post focused on custom header template.

Now, let us modify Price and ExpiryDate columns with currency and date pipes.

<igx-grid [data]="products" [autoGenerate]="false" width="960px">    <igx-column field="Id" header="Id"></igx-column>    <igx-column field="Title" header="Title"></igx-column>    <igx-column field="ExpiryDate" header="Expiry Date">        <ng-template igxCell let-value>            {{ value | date }}        </ng-template>    </igx-column>    <igx-column field="Price" header="Price">        <ng-template igxCell let-value>            {{ value | currency }}        </ng-template>    </igx-column>    <igx-column field="Rating" header="Rating"></igx-column></igx-grid>

You will get the grid rendered, as shown in the image below:

You can also pass parameters to pipes while using that in IgxGrid.

You can pass any number of parameters to pipes as supported by them, for example, additional parameters can be passed to currency pipe as shown below:

If you are working with date pipe, you can pass parameters as shown below:

If you have created custom pipes, you can also use that, as shown below:

Here firstcharacteruppercase is a custom pipe. If you are not sure how to create it, learn more about it here.

Not only simple pipes, you can also use other Ignite UI for Angular components when formatting column data for better visualization.  I will cover that in separate blog post. Let us put everything together to use data on  igxGrid as shown below:

<igx-grid [data]="products" [autoGenerate]="false" width="960px">    <igx-column field="Id" header="Id"></igx-column>    <igx-column field="Title" header="Title">        <ng-template igxCell let-value>            {{ value | firstcharacteruppercase }}        </ng-template>    </igx-column>    <igx-column field="ExpiryDate" header="Expiry Date">        <ng-template igxCell let-value>            {{ value | date :'fullDate'}}        </ng-template>    </igx-column>    <igx-column [sortable]='true' field="Price" header="Price">        <ng-template igxCell let-value>            {{ value | currency:'CAD':'symbol':'4.2-2'}}        </ng-template>    </igx-column>    <igx-column field="Rating" header="Rating">    </igx-column></igx-grid>

Now you can see the grid is rendered as shown in the image below:

Now you may have a question that what if you are using auto-generated columns, then how you will format data in the desired way. How can you set other properties of the column such as width, sorting, paging, data format, header style, pinning, etc.?  I will cover this in another blog post. As of now, I hope you find this post useful and now know how easy it is to format data using templates in Ignite UI for Angular Grid. You can learn more about Ignite UI for Angular Grid here.  To learn more about pipes, watch the  Desktop to Web: Transforming Data with Angular Pipes video 

15 WPF Performance Tips for 2019

$
0
0

Are you a WPF developer? Do your WPF apps have areas of poor performance or don’t run as quickly as you would like?  If so, I have 15 tips to help you identify and improve the performance of your WPF applications. 

While WPF is over a decade old and has been improved greatly over the years, there are still several areas that can suffer from poor performance.  The reasons for this poor performance include things such as bad coding practices, broken bindings, complex layouts, the lack of UI virtualization, and much more. Luckily, with a little planning and a solid understanding of the WPF platform, you can have your WPF apps jumping into warp speed and leaping across the universe in milliseconds. 

I have put together these 15 tips to help you improve the performance of your WPF apps.

1. Simplify your Visual Tree

A common source of performance issues is a deep and complex layout. Keep your XAML markup as simple and shallow as possible. When UI elements are drawn onscreen, a “layout pass” is called twice for each element (a measure pass and an arrange pass). The layout pass is a mathematically-intensive process—the larger the number of children in the element, the greater the number of calculations required.  

2. Virtualize your ItemsControls

As mentioned earlier, a complex and deep visual tree results in a larger memory footprint and slower performance. ItemsControls usually increase performance problems with deep visual trees because they are not virtualized. This means they are constantly being created and destroyed for each item in the control. Instead, use the VirtualizingStackPanel as the items host and make use of the VirtualizingStackPanel.IsVirtualizing and set the VirtualizationMode to Recycling in order to reuse item containers instead of creating new ones each time. 

3. Favor StaticResources over DynamicResources

StaticResources provide values for any XAML property attribute by looking up a reference to an already defined resource. Lookup behavior for that resource is the same as a compile-time lookup. DynamicResources will create a temporary expression and defer lookup for resources until the requested resource value is required. Lookup behavior for that resource is the same as a run-time lookup, which imposes a performance impact. Always use a StaticResource whenever possible. 

4. Opacity on Brushes Instead of Elements

If you use a Brush to set the Fill or Stroke of an element, it is better to set the Opacity on the Brush rather than setting the element’s Opacity property. When you modify an element’s Opacity property, it can cause WPF to create temporary surfaces which results in a performance hit. 

5. Avoid Using Run to Set Text Properties

Avoid using Runs within a TextBlock as this results in a much higher performance intensive operation. If you are using a Run to set text properties, set those directly on the TextBlock instead. 

6. Favor StreamGeometries over PathGeometries

The StreamGeometry object is a very light-weight alternative to a PathGeometry. StreamGeometry is optimized for handling many PathGeometry objects. It consumes less memory and performs much better when compared to using many PathGeometry objects. 

7. Use Reduced Image Sizes

If your app requires the display of smaller thumbnails, consider creating reduced-sized versions of your images. By default, WPF will load and decode your image to its full size. This can be the source of many performance problems if you are loading full images and scaling them down to thumbnail sizes in controls such as an ItemsControl. If possible, combine all images into a single image, such as a film strip composed of multiple images. 

8. Lower the BitMapScalingMode

By default, WPF uses a high-quality image re-sampling algorithm that can sometimes consume system resources which results in frame rate degradation and causes animations to stutter. Instead, set the BitMapScalingMode to LowQuality to switch from a “quality-optimized” algorithm to a “speed-optimized” algorithm. 

9. Use and Freeze Freezables

A Freezable is a special type of object that has two states: unfrozen and frozen. When you freeze an object such as a Brush or Geometry, it can no longer be modified. Freezing objects whenever possible improves the performance of your application and reduces its memory consumption. 

10. Fix your Binding Errors

Binding errors are the most common type of performance problem in WPF apps. Every time a binding error occurs, your app takes a perf hit and as it tries to resolve the binding and writes the error out to the trace log. As you can imagine, the more binding errors you have the bigger the performance hit your app will take. Take the time to find and fix all your binding errors. Using a RelativeSource binding in DataTemplates is a major culprit in binding error as the binding is usually not resolved properly until the DataTempate has completed its initialization. Avoid using RelativeSource.FindAncestor at all costs. Instead, define an attached property and use property inheritance to push values down the visual tree instead of looking up the visual tree. 

11. Avoid Databinding to the Label.Content Property

If you are using a Label to data bind to a String property, this will result in poor performance. This is because each time the String source is updated, the old string object is discarded, and a new String is created. If the Content of the Label is simple text, replace it with a TextBlock and bind to the Text property instead. 

12. Bind ItemsControls to IList instead of IEnumerable

When data binding an ItemsControl to an IEnumerable, WPF will create a wrapper of type IList<T> which negatively impacts performance with the creation of a second object. Instead, bind the ItemsControl directly to an IList to avoid the overhead of the wrapper object. 

13. Use the NeutralResourcesLanguage Attribute

Use the NeutralResourcesLanguageAttribute to tell the ResourceManager what the neutral culture is and avoid unsuccessful satellite assembly lookups. 

14. Load Data on Separate Threads

A very common source of performance problems, UI freezes, and apps that stop responding is how you load your data. Make sure you are asynchronously loading your data on a separate thread as to not overload the UI thread. Loading data on the UI thread will result in very poor performance and an overall bad end-user experience. Multi-threading should be something every WPF developer is using in their applications. 

15. Beware of Memory Leaks

Memory leaks are the number one cause of performance problems in most WPF applications.  They are easy to have but can be difficult to find.  For example, using the DependencyPropertyDescriptor.AddValueChanged can cause the WPF framework to take a strong reference to the source of the event that isn’t removed until you manually call DependencyPropertyDescriptor.RemoveValueChanged. If your views or behaviors rely on events being raised from an object or ViewModel (such as INotifyPropertyChanged), subscribe to them weakly or make sure you are manually unsubscribing. Also, if you are binding to properties in a ViewModel which does not implement INotifyPropertyChanged, chances are you have a memory leak. 

Finally, a bonus tip. Sometimes when you have a performance problem it can be very difficult to identify what exactly is causing the issue. I suggest using an application performance profiler to help identify where these performance bottle necks are occurring in your code base. There are a lot of profiler options available to you. Some are paid, and some are free. The one I personally use the most is the Diagnosis Tools built directly into Visual Studio 2019.

Be sure to engage with me on Twitter, subscribe to my YouTube channel to be notified of new video content, and follow me on Twitch to watch me stream live.


Inspect for Sketch prototypes in the cloud or private server

$
0
0
Extract any visual specifications directly from Sketch designs using Indigo.Design's Inspect feature. (read more)

Ignite UI Release Notes - June 2019: 18.2, 19.1 Service Release

$
0
0

With every release comes a set of release notes that reflects the state of resolved bugs and new additions from the previous release. You’ll find the notes useful to help determine the resolution of existing issues from a past release and as a means of determining where to test your applications when upgrading from one version to the next.

Release notes are available in both PDF and Excel formats. The PDF summarizes the changes to this release along with a listing of each item. The Excel sheet includes each change item and makes it easy for you to sort, filter and otherwise manipulate the data to your liking.

Download the Release Notes

Ignite UI 2018 Volume 2

Ignite UI 2019 Volume 1

Working with Auto-Generated Columns in the Ignite UI for Angular Grid

$
0
0

Ignite UI for Angular Grid is the fastest data grid available. It not only helps to run applications faster but also allows you as a developer to write applications faster. To see it in action, assume that you have a  data source as shown in the code listing below: 

this.products = [
    { Id: '1', Title: 'Book', ExpiryDate: new Date(), Price: 35, Rating: 3.5 },
    { Id: '2', Title: 'Pen', ExpiryDate: new Date(), Price: 25, Rating: 4.0 },
    { Id: '3', Title: 'Pencil', ExpiryDate: new Date(), Price: 20, Rating: 3.2 },
    { Id: '4', Title: 'Bat', ExpiryDate: new Date(), Price: 135, Rating: 4.0 },
    { Id: '5', Title: 'Ball', ExpiryDate: new Date(), Price: 65, Rating: 3.8 },
];

 

You can render the above data in igxGrid by simply defining an instance of the igxGrid in the component’s template and binding the data property to the product array. It is straightforward to add as shown in the below code listing:

<igx-grid [data]="products"           [autoGenerate]="true"           width="960px"> </igx-grid>

By setting only data and autoGenerate properties, you should get data rendered in igxGrid as shown below:

Since the autoGenerate property is set to true, Ignite UI will generate columns with default properties configured. However, Ignite UI for Angular Grid has a ton of features such as:

  • Filtering
  • Paging
  • Sorting
  • Column pinning
  • Column hiding
  • Column template
  • Header template etc. and many more.

As a developer, you may want to configure these features depending on your business requirements. There are two ways to do this:

  1. Set the autoGenerate property to false and configure columns manually. Learn more about it here.
  2. If columns are generated automatically, configure the above features at run time in the component class.

We can configure essential features at run time when columns are initialized. Ignite UI for Angular igxGridComponent provides you an event onColumInit.

 

At the time of column initialization, the onColumnInit event is executed. Any business logic you wish to execute at this time, you should write inside this event. For example, we can write code to enable various features as shown in the below image:

You can handle the event in the component class, as shown in the code listing below:

If you want to pin a particular column in a particular location, you can do that as follows

public onColumnInit(column: IgxColumnComponent) {
    if (column.field === 'Title') {
        column.pin();
    }
}

You will find the Title column pinned to the left side as shown below:

You can hide a column at runtime while initializing by setting the hidden property value to true:

public onColumnInit(column: IgxColumnComponent) {
    if (column.field === 'Id') {
        column.hidden = true;
    }
}

 You can also make a column editable by setting the editable property to true:

 public onColumnInit(column: IgxColumnComponent) {
    if (column.field === 'ExpiryDate') {
        column.editable = true;
    }
}

When igxGrid renders, ExpiryDate column should be editable as shown in below image. You might also notice that in editing mode, Ignite UI gives you the option to edit the date type column in igxCalandar

As you can see, it’s very easy to configure various fetaures in auto generated columns.  Besides configuring features, you can also format column data to a specfied output. In Angular, pipes do that. So for auto generated columns, you apply pipes using the formatter function.

Let us say that you want to,

  1. Display ExpiryDate in specific date format
  2. Display Title in upper case

For that, you can use the formatter function in onColumnInit event as shown in the below image. Here we are using toLocaleDateString to convert date output to local date format and toUpperCase to display output in uppercase.

After applying above formatter, you will find data in Title column is formatted in uppercase and data of ExpiryDate column is formatted in the local date string format.

You can use formatter for complex business logic as well. You can pass multiple statements as logic using the formatter arrow function. For example, for Price column, if price data is less than 50, you need to add a text ‘Discounted’ next to the price data. You can very quickly do that, as shown in the image below:

You will get Ignite UI for Angular Grid rendered with applied formatter as shown in the image below:

As discussed earlier, not only format the column data but also you can utilize other features also. Very smoothly, you can perform various other operations such as

 

  • Setting a summary
  • Setting filters
  • Setting formatters
  • Setting width
  • Setting header value
  • Setting header template
  • Setting movable property
  • Setting hidden attributes etc.

 

We will  cover the above features individually in other blog posts. However, it’s important that you understand how to configure features when Ignite UI for Angular Grid columns are being initialized, as discussed in this blog.  You can download a 30-day trial of Ignite UI for Angular from here. I hope you find this post useful.

Infragistics ASP.NET Release Notes - June 2019: 18.2, 19.1 Service Release

$
0
0

With every release comes a set of release notes that reflects the state of resolved bugs and new additions from the previous release. You’ll find the notes useful to help determine the resolution of existing issues from a past release and as a means of determining where to test your applications when upgrading from one version to the next.

Release notes are available in both PDF and Excel formats. The PDF summarizes the changes to this release along with a listing of each item. The Excel sheet includes each change item and makes it easy for you to sort, filter and otherwise manipulate the data to your liking.

Download the Release Notes

ASP.NET 2018 Volume 2

ASP.NET 2019 Volume 1

Infragistics Windows Forms Release Notes - June 2019: 18.2, 19.1 Service Release

$
0
0

Release notes reflect the state of resolved bugs and new additions from the previous release. You will find these notes useful to help determine the resolution of existing issues from a past release and as a means of determining where to test your applications when upgrading from one version to the next.

Release notes are available in both PDF and Excel formats. The PDF summarizes the changes to this release along with a listing of each item. The Excel sheet includes each change item and makes it easy for you to sort, filter and otherwise manipulate the data to your liking.

In order to download release notes, use the following links:

Windows Forms 2018 Volume 2 Service Release (Build 18.2.20182.XXXX)

PDF - Infragistics for Windows Forms 2018 Volume 2
Excel - Infragistics for Windows Forms 2018 Volume 2

Windows Forms 2019 Volume 1 Service Release (Build 19.1.20191.XXXX)

PDF - Infragistics for Windows Forms 2019 Volume 1
Excel - Infragistics for Windows Forms 2019 Volume 1

Windows Forms UI Controls

Viewing all 2398 articles
Browse latest View live