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

iOS Quick Tip: Split a UIImage into Multiple Parts

$
0
0
Given a UIImage, in some cases you may want to have the image split. For example, say you wanted to create a Flipboard or Paper like interface, where you have a screen shot of a UIVIew, and you want to have the appearance of it folding. To do this you can use the CGImageCreateWithImageInRect method in objective-c. The code below is an example of how to use this method. In this scenario we're splitting the image in half, a left and right image. -(void)splitImage:(UIImage *)image { CGFloat imgWidth...(read more)

Google Input Tools: An Overview

$
0
0

An overview of Google Input Tools

Latest figures from around the web suggest that over two billion people now use the Internet, with nearly two thirds of these using it every single day. Usage spans the globe, with nearly fifty percent of users in Asia alone. In fact the majority of web users are now non-English speakers. This poses a number of interesting challenges and opportunities for language and how it is used online. Specifically how do users of non-English languages (which utilize non standard alphabets and scripts) communicate in their native tongue?

Google Input Tools are a set of applications and services that make it easy to use over ninety languages on the web - when writing email, on Android phones, and even in desktop apps. Consisting of onscreen keyboards and custom dictionaries, Google Input Tools allows the full expression of language to be communicated quickly and easily online. Once installed the various tools allow text to be entered in different languages, specifically those languages that don’t use the standard Western alphabet script. On traditional PCs the tools allow text to be entered using virtual onscreen keyboards. On Android devices, phones and tablets, the out of the box (digital) keyboards can be replaced altogether. Devices that support handwriting recognition can take advantage of this form of input.

Google Input Tools consist of the following components:

App for Android devices
Google Keyboard offers a number of advanced input features - like gesture typing, voice typing, and advanced layouts. The app also supports dictionaries for 26 languages and personalised suggestions, corrections and completions. The Android App Store also includes a number of alternative keyboards, made available by the Google Input Tools team, to support native composition in languages such as Hindu and Japanese. More information here

A Google Chrome extension
This extension allows users of the Chrome browser to switch language with the click of a mouse. Included is support for over 90 languages, 30 different scripts, and handwriting input for 40 languages. This is a very flexible option for those doing a lot of work on the web. More information here

Features in a range of Google Services
Google has baked its Input Tools into a number of its own core services. In Gmail, for example, users can turn on additional software keyboards in the settings section. Google Drive, and thus Google Docs, include similar options. Support even extends to sites like YouTube, with options for both video searches and content managers. More information here

A desktop app for Windows computers
As a desktop application this version of Input Tools doesn’t rely on an Internet connection for the bulk of its operation. Features include dictionary based word completion, single click web search for highlighted words (which does need an online access), and the ability to store personalised settings (such as specific word corrections). This version of Input Tools supports 22 different languages. More information here

Passing Data Between View Controllers (iOS Obj-C)

$
0
0

Introduction

When designing an app that makes use of multiple view controllers it may become necessary to pass data back and forth between the view controllers. This common occurance will be covered in this blog post by demonstrating passing data to the next view controller as well as passing data back to the previous view controller.

Passing Data Forward to a View Controller

Passing Data Forward to a View Controller

To pass data forward to the next view controller, expose properties on the next view controller. In this example, we'll expose a data property of type NSString. In your own project you can use whatever data type you wish, including custom objects.

@interface SecondViewController : UIViewController@property (nonatomic, retain) NSString *data;@end

The code to create an instance of this view controller along with passing of the data is as follows. This example passes the text contained in a label to the second view controller.

- (void)passDataForward
{SecondViewController *secondViewController = [[SecondViewController alloc] init];
    secondViewController.data = _label.text; // Set the exposed property
    [self.navigationController pushViewController:secondViewController animated:YES];
}

When your next view controller is loading it's then possible to use the assigned data. Our sample project sets the text of a label using the exposed data variable.

UILabel *label = [[UILabel alloc] initWithFrame:CGRectInset(top, 5, 5)];
label.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleBottomMargin;
label.textAlignment = NSTextAlignmentCenter;
label.text = [NSString stringWithFormat:@"Your data: %@", _data]; // Make use of the exposed data property
[self.view addSubview:label];

Passing Data Back to the Previous View Controller

To pass data back to the previous view controller, you will need to create a delegate protocol the second view controller uses and exposes to the previous view controller. The sample delegate shown in this example forces implementation of the dataFromController: method by the adopter. The second view controller exposes the delegate protocol through the delegate property.

@protocol SecondViewControllerDelegate <NSObject>@required
- (void)dataFromController:(NSString *)data;@end@interface SecondViewController : UIViewController@property (nonatomic, retain) NSString *data;@property (nonatomic, weak) id<SecondViewControllerDelegate> delegate;@end

On the first view controller we need to adopt this delegate protocol.

@interface FirstViewController () <SecondViewControllerDelegate>
{UILabel *_label;UIButton *_button;
}@end

Now that the delegate protocol is adopted, we must implement the required methods. In this method, our sample sets the label text to the data passed in and disables the button.

- (void)dataFromController:(NSString *)data
{_label.text = data;_button.enabled = NO;
}

For this method and adoption of the delegate protocol to work, we must set the delegate property to self.

- (void)passDataForward
{SecondViewController *secondViewController = [[SecondViewController alloc] init];
    secondViewController.data = _label.text;
    secondViewController.delegate = self; // Set the second view controller's delegate to self
    [self.navigationController pushViewController:secondViewController animated:YES];
}

Download the Example Project

The Xcode project source code for this quick tip can be downloaded by clicking this link.

By Torrey Betts

Using different template engines with Ignite UI controls

$
0
0

header imageCreating an application is not only about making it functional it is about how the users will react to it. Did you know that when you create a mobile app for example a user decides in the first 10 seconds whether he likes it or not? So imagine how will you feel if the application is slow and you have to wait these seconds only for it to render? For us in Infragistics the User Experience is a top priority, that is why in the new 14.1 release we went through some major changes in order to optimize the UX of our users.

First we deprecated the rowTemplate option of the igGrid and thus we increased the templated igGrid rendering with more than 40%. And second we removed the dependence between the template and the syntaxes of the Infragistics Template Engine.  The second alteration was driven by our desire users to feel free to use any Template Engine they like. In this blog we are going to go through some of the most popular template engines and see how to use them with the Infragistics Ignite UI controls.

What’s New in 14.1 Template Engine

A major changes in the new 14.1 release is that the rowTemplate option has been deprecated. This is a breaking change from the previous versions’ functionality. The igGrid control now uses only the templates for individual columns. As before you can use templates only for some of them (will be rendered through the template engine) and  the other columns will render along with the grid render. This actually increases the render of the grid with more than 40% and thus with this alteration we did not only make the control faster but we also optimized the user experience when interacting with it.

Let’s see the grid in action. For the demo I’m going to use the Infragistics Template Engine. For some of the columns I‘m going to use different templates and the other I will leave unattached with template. Setting the template option separately to every column is very handy because it gives you the opportunity to manipulate them differently. You can check out the demo in jsFiddle to see it for yourself.

Condition Template:

  1. <scriptid="colTmpl"type="text/template">
  2.  
  3.     {{if${SoldLastMonth}<=${SoldThisMonth} }}         
  4.     <imgwidth='10'height='15'src='http://igniteui.com/images/samples/templating-engine/colTemplateWithConditionalCell/arrowUp.gif'/>
  5.     {{else}}
  6.     <imgwidth='10'height='15'src='http://igniteui.com/images/samples/templating-engine/colTemplateWithConditionalCell/arrowDown.gif'/>
  7.     {{/if}}
  8.  
  9. </script>

Grid Initialization:

  1. $("#grid1").igGrid({
  2.     primaryKey: "ProductID",
  3.     width: '700px',
  4.     height: '600px',
  5.     rowVirtualization: true,
  6.     virtualizationMode: "fixed",
  7.     avgRowHeight: "60",
  8.     autoGenerateColumns: false,
  9.     columns: [
  10.         { headerText: "Product ID", key: "ProductID", dataType: "number" },
  11.         { headerText: "Units in Stock", key: "UnitsInStock", dataType: "number", template: "Units in Stock: ${UnitsInStock}" },
  12.         { headerText: "Product Description", key: "ProductDescription", dataType: "string" },
  13.         { headerText: "Unit Price", key: "UnitPrice", dataType: "string", template: "Unit Price: ${UnitPrice}" },
  14.         { headerText: "Sold last month", key: "SoldLastMonth", dataType: "number", template: "Sold last month: ${SoldLastMonth}" },
  15.         { headerText: "Sold this month", key: "SoldThisMonth", dataType: "number", template: "Sold this month: ${SoldThisMonth}" + $("#colTmpl").html() }
  16.     ],
  17.     tabIndex: 1,
  18.     dataSource: namedData
  19. });

Another change is that the template is no longer tied to the Infragistics Template Engine syntax which gives you the opportunity to use any other template system and override the template. Further in the blog I am going to show you how to do that in details.

Fire up Ignite UI controls with different template engines

The increased use of JavaScript led to the development of many JS libraries to support the applications developed in this language. When it comes to client side data-binding method it is convenient to use one of those templating libraries. As you know Infragistics has a great Templating Engine and you can easily use it to create templates and use them with the Ignite UI controls. But in case that is not enough for you and you want to use another Framework that is not a problem anymore - you just have to override the template. We are going to look at some of the most popular template engines and see how to do that and fire up some of the Ignite UI controls with the different frameworks. By overriding the Ignite UI template function you can easily use different template engines. The main idea is that every control that has a template option goes through the template function. This function takes two arguments – template as string and the data object to be rendered (called automatically by the controls) and should return the final result as HTML string.

HandleBars.js and Mustache.js

Mustache for example is often considered as a base for the JavaScript templating. This template system is described as a “logic-less” system because it lacks any explicit control flow statements.  On top of it is build the HandleBars  template engine. This is one of the most popular templating library and it adds a lot of helpers to Mustache. The syntaxes of these two templates is similar - they both use double curly braces.

If you choose to use HandleBars.js to render a template you should first create the template  and then you can compile it by using the Handlebars.compile function. To get the HTML result of the evaluated template you have to execute the template with the data that you want to use.

  1. $.ig.tmpl = function (tmpl, data) {            
  2.     var template = Handlebars.compile(tmpl);
  3.     return template(data);
  4. };
  5.  
  6. $("#grid1").igGrid({
  7.         primaryKey: "ProductID",
  8.         width: '700px',
  9.         height: '600px',
  10.         rowVirtualization: true,
  11.         virtualizationMode: "fixed",
  12.         avgRowHeight: "60",
  13.         autoGenerateColumns: false,
  14.         columns: [
  15.                { headerText: "Product ID", key: "ProductID", dataType: "number", template: "PID: {{ProductID}}" },
  16.             { headerText: "Units in Stock", key: "UnitsInStock", dataType: "number", template: "In stock: {{UnitsInStock}}" },
  17.             { headerText: "Product Description", key: "ProductDescription", dataType: "string", template: "Desc: {{ProductDescription}}" },
  18.             { headerText: "DateAdded", key: "DateAdded", dataType: "date", hidden: true, template: "Date: {{DateAdded}}" },
  19.             { headerText: "Unit Price", key: "UnitPrice", dataType: "string", template: "unitprice: {{UnitPrice}}" }
  20.         ],               
  21.         tabIndex: 1,                
  22.         dataSource: namedData
  23.     });

The template for Mustache.js is the same as the one we use with HandleBars because they have similar syntax. The difference appears in the override function – you have to use the Mustache.render to compile the template.

  1. $.ig.tmpl = function (tmpl, data) {
  2.     var template = Mustache.render(tmpl, data);
  3.     return template;
  4. };

 

Ignite UI igGrid with Hadlebars.js template

On jsFiddle can check out a demo using the igGrid with HandleBars Template Engine .

Underscore.js

The Underscore is a JavaScript library that provides  functional helpers without extending any built-in objects.  As any template Underscore has its specific syntax so you can either use this syntax when you call the template or you can change the Underscore’s template settings to use different symbols. This can be accomplished by defining a regex to  match the expression that should be evaluated.

Using Underscore syntax:

  1. $.ig.tmpl = function (tmpl, data) {
  2.     var template = _.template(tmpl);          
  3.     return template(data);
  4. };
  5.  
  6.  
  7. $("#grid1").igGrid({
  8.         primaryKey: "ProductID",
  9.         width: '700px',
  10.         height: '600px',
  11.         rowVirtualization: true,
  12.         virtualizationMode: "fixed",
  13.         avgRowHeight: "60",
  14.         autoGenerateColumns: false,
  15.         columns: [
  16.                { headerText: "Product ID", key: "ProductID", dataType: "number", template: "PID: <%- ProductID %>" },
  17.             { headerText: "Units in Stock", key: "UnitsInStock", dataType: "number", template: "In stock: <%- UnitsInStock %>" },
  18.             { headerText: "Product Description", key: "ProductDescription", dataType: "string", template: "Desc: <%- ProductDescription %>" },
  19.             { headerText: "DateAdded", key: "DateAdded", dataType: "date", hidden: true, template: "Date: <%- DateAdded %>" },
  20.             { headerText: "Unit Price", key: "UnitPrice", dataType: "string", template: "unitprice: <%- UnitPrice %>" }
  21.         ],               
  22.         tabIndex: 1,                
  23.         dataSource: namedData
  24.     });
  25. });

Changed Underscore template setting to perform HandleBars.js style template:

  1.     $.ig.tmpl = function (tmpl, data) {
  2.  
  3.         _.templateSettings = {
  4.             interpolate: /\{\{(.+?)\}\}/g
  5.         };
  6.         var template = _.template(tmpl);          
  7.         return template(data);
  8.     };
  9.  
  10.  
  11.     $("#grid1").igGrid({
  12.             primaryKey: "ProductID",
  13.             width: '700px',
  14.             height: '600px',
  15.             rowVirtualization: true,
  16.             virtualizationMode: "fixed",
  17.             avgRowHeight: "60",
  18.             autoGenerateColumns: false,
  19.             columns: [
  20.                    { headerText: "Product ID", key: "ProductID", dataType: "number", template: "PID: {{ProductID}}" },
  21.                 { headerText: "Units in Stock", key: "UnitsInStock", dataType: "number", template: "In stock: {{UnitsInStock}}" },
  22.                 { headerText: "Product Description", key: "ProductDescription", dataType: "string", template: "Desc: {{ProductDescription}}" },
  23.                 { headerText: "DateAdded", key: "DateAdded", dataType: "date", hidden: true, template: "Date: {{DateAdded}}" },
  24.                 { headerText: "Unit Price", key: "UnitPrice", dataType: "string", template: "unitprice: {{UnitPrice}}" }
  25.             ],               
  26.             tabIndex: 1,                
  27.             dataSource: namedData
  28.         });

On jsFiddle you can see how to use igCombo with Underscore.

Ignite UI igCombo with Underscore.js

jsRender

I have already written a blog about the jsRender integration with the igGrid, but that was about the 13.2 release. Now after the deprecation of the rowTemplate let’s go back and see how to change the Heat map sample. It is actually pretty simple all you need to do is set different templates to the columns that you want to participate in the establishment of the heat map. You can check out a demo of the sample in jsFiddle.

  1. $("#grid").igGrid({
  2.     width: "600px",
  3.     height: "500px",
  4.     dataSource: busy,
  5.     columns: [
  6.         { headerText: "Id", key: "ID" },
  7.         { headerText: "Name", key: "Name" },
  8.         { headerText: "Mon", key: "Mon", template: "<td style='background: {{:~colorChange(Mon)}};'><b>{{>Mon}}%</b></td>" },
  9.         { headerText: "Tue", key: "Tue", template: "<td style='background: {{:~colorChange(Tue)}};'><b>{{>Tue}}%</b></td>" },
  10.         { headerText: "Wed", key: "Wed", template: "<td style='background: {{:~colorChange(Wed)}};'><b>{{>Wed}}%</b></td>" },
  11.         { headerText: "Thu", key: "Thu", template: "<td style='background: {{:~colorChange(Thu)}};'><b>{{>Thu}}%</b></td>" },
  12.         { headerText: "Fri", key: "Fri", template: "<td style='background: {{:~colorChange(Fri)}};'><b>{{>Fri}}%</b></td>" }
  13.     ],
  14.     templatingEngine: "jsrender"
  15. });

Ignite UI igGrid heat map with jsRender

By following the above shown examples you can use any template engine you like and override the template in a similar way.

Summary

Every web developer has his preferences when it comes to using a JS libraries to help you create stunning applications. And what is better than being able to use them along with Ignite UI controls.  With the latest release of our Web widgets we give you the opportunity to blend your favorite template engine with our controls by overriding the template function. Our desire was to make you feel comfortable and thus create your apps faster and easier.

 

You can follow us on Twitter @Infragistics and stay in touch on Facebook, Google+ and LinkedIn!

Simple Should Be Better, Not Boring - World IA Day 2014

$
0
0

On March 22, Infragistics Consulting Division, D3 Services, hosted its second annual World IA Day event at our Cranbury, NJ headquarters. This annual event, which took place in cities around the world, highlighted the roles of UX, interaction design, development and sales in information architecture and user experience design.

At the event, D3 UX Visual Designer Megan Ezeadi talked about the importance of good design in her presentation, "Simple Should Be Better, Not Boring". Check out her full presentation below:

[youtube] width="640" height="360" src="http://www.youtube.com/embed/TgGTFz5TKEw" [/youtube]

For more videos like this one, be sure to subscribe to our YouTube channel!

Feature Persistence in the Ignite UI jQuery Grid and Hierarchical Grid

$
0
0

Feature Persistence header imageDo you know what persistence is? Well when it comes to programming persistence means to save the current state of the process. Without this capability, the state will exist as long as the process is alive. This is an important feature when it comes to manipulating data in a grid. Imagine the following scenarios: You are using remote paging and you do some selection when you need to check the next page for something and return to finish your work just to find it’s all gone. Or for example you sort and filter your data when you decide that you want to refresh it in order to see if any changes have been made and after rebinding your data your previous actions has vanished.  Unpleasant right? That is exactly why in the new 14.1 release of the Ignite UI Grid control we added a new persist feature to help our users interact with the data they load in the grid effortlessly and without loosing a minute to redo your work afterwards.

 

Feature Persistence 

The breaking change around the jQuery Grid and Hierarchical Grid is that they now maintain state between re-bindings. This persist option is supported with the Filtering, GroupBy, RowSelectors, Selection and Sorting features. By default all of these features’ persistence is true. This means that when you enable any of these features you will be using it in a persist mode. When the dataBind function is explicitly called the persistence will be applied for UI and data source view. But if you want to retain the previous behavior  of interactions being cleared after user re-binds the igGrid, you have to disable the persist option by setting it to false. When you use selection persistence enabled it is good to provide an explicit, unique primary key. The persistence of the above mentioned features is implemented for the igHierarchicalGrid as well. In our sample browser you can find a great example showing you feature persistence in action.

Selection

As I said when you enable the igGridSelection feature you are using it in a persist mode and if you want to use it in the previous default behavior you have to use the persist option and set it to false.  Being in a persist mode means that when you select a row or a cell it will remain selected after you interact with another features of the grid such as sorting, filtering or if you use the data binding function.  Persisting depends on the feature’s ability to unambiguously distinguish rows and columns from one another. As row indexes are not stable and therefore unusable for this purpose, igGridSelection will use either the user-defined primary key of the grid or will generate pseudo-unique identifiers for each row based on the corresponding record’s property values.

Selection Persistence igGrid

Sorting

Similar to the selection features when you enable the sorting feature you will be using it in a persistence mode. This means that after you call a data bind function the persistence is applied for the UI (CSS classes are applied) and the data source remains sorted.

Sorting Persistence igGrid

Filtering and GroupBy

With risk of repeating I will say that the filtering feature by default is in persistent mode – so when you call dataBind() the filter editors will not clear and the data source will remain filtered. Same goes for the group by feature– the grouped columns wont be cleared and the data source will remain sorted.

Filtering and GroupBy persistence igGrid

Limitations

When it comes to Unbound Columns there are some tricky things to watch for. Sorting, filtering and groupby for example do not persist their state when they are applied to unbound columns. Another issue is connected with igGridPaging. When you change page size with remote Paging  the remote Sorting and Filtering don’t persist.

If you are working with a hierarchical grid pay attention that remote filtering, sorting and group by are not persisted for child layouts without load-on demand.

Summary

Persistence between states is an important option when you are dealing with a grid. By default Sorting, Filtering, Selection and GroupBy features are in persistent mode which means that after you refresh your data, the UI and the data source view will remain the same.

 

You can see a live demo of feature persistence with remote Paging on jsFiddle or a sample with remote data but local Paging.

You can follow us on Twitter @Infragistics and stay in touch on Facebook, Google+ and LinkedIn!

What’s New in IG Test Automation 2014.1

$
0
0

The primary focus for Infragistics Test Automation is to offer you peace of mind. Such that when you develop with our controls, your teams can seamlessly implement automated testing of the user interface (UI) to confidently produce higher-quality releases. IG Test Automation, currently supports our Windows Forms controls via HP’s Unified Functional Testing (UFT) and IBM’s Rational Functional Tester (RFT).  We also support our WPF controls via HP’s UFT.

As IG Test Automation’s purpose is to automate tests of the UI of applications using IG controls, this what’s new will start off with the new controls, it should be noted that CTP controls are typically not supported until full release. I will follow with changes in existing controls that had changes that would affect how the UI behaved, then I will list any improvements to IG Test Automation that is not dependant upon the controls, lastly I’ll list any bug fixes that were implemented this cycle.

 

New Infragistics Controls

IG Windows Form’s UltraPivotGrid

The UltraPivotGrid allows you to embed Microsoft Excel styled PivotTables directly into your application. Giving your end users access to sophisticated analytics and reporting functionality.

 

IG WPF’s XamRadialMenu

The radial menu is a circular menu that provides a fast navigation for users. This control was inspired by Microsoft’s OneNote MX 2013 radial menu. This kind of menu is useful and convenient for touch devices.

XamRadialMenu

 

IG Control’s with UI altering Improvements

IG Windows Form’s Editors

New to the IG Editor’s was right to left support. The following control’s now support right to left.

  • UltraCalculator
  • UltraCalculatorDropDown
  • UltraCheckEditor
  • UltraColorPicker
  • UltraComboEditor
  • UltraCurrencyEditor
  • UltraDateTimeEditor
  • UltraNumericEditor
  • UltraOptionSet
  • UltraTextEditor
  • UltraCombo
  • UltraDropDownButton

IG Windows Form’s UltraTab

New to the UltraTab was a New Tab button to emulate the behavior of most modern tab-based web browsers. When the user clicks the button a new tab is added to the control.

IG Window’s Form’s UltraToolbarsManager Ribbon

New the Ribbon is the ability to let the developer change the display behavior of the Ribbon’s Tab item area. When all the commands are grouped on a single tab, there is a lot of application space that is unnecessarily reserved to display a single tab item It allows the developer to hit the tab items (in red) or the entire tab area (in blue) to regain the space.

  UltraToolbars Manager, Tab Item Visibility

IG WPF’s XamDataGrid

While there were several improvement’s to the XamDataGrid, including adding a SelectedItems property, which returns the underlying data item’s that are selected, and row numbering, it was the changes to filtering that affected the UI. Specifically there were two new operands added to the filtering menu, In, and NotIn.  As well as allowing the developer to change how filtering affects the UI. By default it hides the filtered out rows, new this release is the ability to dim the filtered out rows.

IG WPF’s XamComboEditor

While there wasn’t really new changes to the UI for the XamComboEditor. There were several properties added to the control, SelectedValue and SelectedValues, that we felt should be offered as testable properties.

IG WPF’s XamRibbon

New to the XamRibbon this release was the an emulation of the Office 2013 style file menu.

Office 2013 styled XamRibbon

Also new is a new Tab Item toolbar area (in red).

XamRibbon, TabItem toolbar area

IG Test Automation improvements

Japanese Localization

Both versions of IG Test Automation for Window’s Forms, have a Japanese localized version.

 

New Bug Fixes in 2014.1

 

TA Product

Control

Description

Win Forms for HP

UltraCalendarCombo

Changing settings for "WinCalendarCombo" has no effect

Win Forms for HP

Settings Utility

WinCalendarCombo setting is duplicated in Settings Utility

Win Forms for HP

UltraToolbarsManager

InvalidCastException occurs when recording against custom RibbonGroup

Win Forms for HP

UltraToolbarsManager

Syntax error with CustomizeContextMenu method

Win Forms for IBM

UltraComboEditor

Cannot record on DropDown list off a ComboEditor when there is an item with no displaytext or datavalue among the ValueListItems list

 

OK-Cancel or Cancel-OK?

$
0
0

Here’s one of the epic questions in UX design: should the OK buttons be to the left of the Cancel button or should it be the other way round?

image of OK and Cancel buttons

Before I go into details, here’s the executive summary: there’s neither a significant difference in performance (task execution speed) nor in user preference.

It’s interesting that although it’s a source of constant discussions, it’s not something that would be published about in textbooks or on the web (if you know of something recent, please let me know!!!).

You can argue that consistency with platform conventions is the most important thing to consider. For desktops, that’s Microsoft/Windows vs. Apple/Mac. The former uses OK-Cancel, the latter Cancel-OK. If you’re designing a desktop product running on Windows, your button sequence should be the same that all other applications on that desktop feature.

On the web it’s not that easy. There, all bets are off because browser-based UIs can be accessed from multiple platforms. You can use web analytics to find out the most used platform for any particular web product, but whatever button sequence you choose, it will not be consistent with that some users know from their operating system. So then, the sequence should be whatever is better from a usability perspective. Here are pros for each sequence (see bottom of blog for the references):

 

Pro OK - Cancel:

  • Supports normal reading flow and sentence structure in the Western culture, where you say for example “Do you agree with me – Yes or no?”. So the positive option comes first, the negative second.
  • Given that in most cases OK is the primary action to complete a flow and therefore is used more frequently than Cancel as the secondary action, OK is faster to hit with the TAB key for keyboard users (assuming a reading direction that goes from left to right).

 

Pro Cancel - OK:

  • Improves the flow, because the dialog "ends" with its conclusion, assuming a reading direction that goes from left to right. The final UI element to interact with – the OK button – is at the right-most position.
  • As with Previous/Next, OK is the option moving you forward towards the completion of your flow, while Cancel moves you back. Therefore, OK should be in the same location as Next - on the right.
  • Less fixations. Users look at all options before choosing which action to take. Most users won’t blindly engage with the left button without also looking at the right button. So in the case of OK – Cancel you look at OK, then look at Cancel and then if you want to engage with OK, you look back to OK. That’s a total of three fixations in two directions. In the case of Cancel – OK you look at Cancel first and OK second. Since OK is what you want, you don’t need to look anywhere else but can just click/tab the OK button. This creates a total of two fixations in one direction.

 

So which way is better? Like with many UX design topics, there’s no right or wrong answer. It’s helpful though to know what speaks for each option. My personal preference is OK-Cancel. What’s yours? Any other reasons than those stated above?

 

Further readings:

http://www.nngroup.com/articles/okndashcancel-or-cancelndashok/

http://uxmovement.com/buttons/why-ok-buttons-in-dialog-boxes-work-best-on-the-right/

http://measuringuserexperience.com/SubmitCancel/


Video: What's New in Test Automation?

$
0
0

Infragistics Ultimate 14.1 saw the addition of some awesome new controls in Windows Forms and WPF. With these updates, we’ve added corresponding support to our TestAutomation suites so you can start testing your applications immediately, and get to market faster. Take a look in our latest video:

[youtube] width="640" height="360" src="http://www.youtube.com/embed/BBMib4Byj8w" [/youtube]

In our Windows Forms control suite, we added the UltraPivotGrid, which allows you to embed Microsoft Excel-styled PivotTables directly into your application. In addition, we added some great improvements to our Tab controls and Toolbars Manager. And for those building applications for an international audience, we’ve implemented right to left support within our Editor control suites, and we’ve even added Japanese language support  to both of our Windows Forms TestAutomation suites: HP Unified Functional Testing and IBM Rational Functional Tester.

In our WPF control suite, we’ve added the Microsoft OneNote stylized XamRadialMenu- and we’ve made great improvements to our Microsoft inspired Ribbon control, our Combo editors, and our DataPresenters, like the XamDataGrid.

As always, our TestAutomation suites for HP Unified Functional Testing give you access to our integrated Intellisense; a rich set of methods and properties that are there to help you with your test case development. And with our TestAutomation suite for IBM’s Rational Functional Tester, you have our comprehensive data verification point system too.

As you can see there are a lot of new controls to test in 14.1; but with Infragistics Test Automation tools, you’ll be ready for anything.

For more videos just like this one, be sure to subscribe to our YouTube Channel!

Microsoft launches Visual Studio 2013 Update 2

$
0
0

Since the Microsoft BUILD developer conference in April, there have been a raft of announcements and product updates concerning the company's developer tools and services. The official release of Update 2 for Visual Studio 2013 is the latest of these, and will be particularly welcome news to those building desktop and mobile apps for the Windows ecosystem.

Microsoft Visual StudioNew features and improvements

Update 2 brings with it a host of improvements and bug fixes, including support for some very key tools that Microsoft is pushing to bolster its support for web and mobile development.

These include:

Universal apps
Since the launch of Windows 8.1 and Windows Phone 8.1, Microsoft has really been pushing the concept of universal apps. The idea is that developers can now create and build a single application and then deploy it across both operating systems (and thus across desktop, laptop, tablet, and smartphone devices). Update 2 makes the development practicalities much simpler.

A universal app in Visual Studio is made up of three components; a Windows Store project (which becomes the application package for Windows 8.1 devices), a Windows Phone project (for Windows Phone 8.1 devices) and a Shared project. The Shared project contains all assets for use by both platforms (including files like cs, xaml, xml, png, resw).

Universal apps are designed to share as much of the same code as is practical, written in C#, C++, or JS. Platform specific code can be included in the Shared project if required, using #if and #endif directives and conditional statements.

Update 2 includes a number of interface tweaks to make developing these sorts of applications a little easier. Intellisense can easily be switched between each of the two platforms, depending which one is being worked on at the time. Switching startup projects, between platforms, has also been improved.

TypeScript
TypeScript is a new programming language developed by Microsoft. First appearing in 2012, it is designed as a superset of JavaScript and offers a number of improvements including type annotations, classes and interfaces. Visual Studio 2013 Update 2 fully supports TypeScript, including features like Intellisense and statement completion.

Web development tool updates
Update 2 includes a raft of updates which those developing web apps will find very useful. The existing LESS editor has been improved and support added for SASS (including IntelliSense, comments, syntax validation, colorization).

A new URL picker is now included for HTML, Razor, CSS, LESS, and SASS editors. Also included is a new JSON project item and editor, which includes all of the formatting and syntax controls you would expect.

You can find out more about the various web development tools on the Microsoft MSDN blog.

Other new features in Update 2 include:

  1. Updates to Team Foundation Server 2013, including cloud load testing application analytics, and improved tagging and charting.
  2. Support for Apache Cordova, a platform for building native applications using HTML, JavaScript, and CSS.
  3. Improved diagnostic tools, including better support for performance events and SQL data queries.
  4. A new slipstream install package which includes both Visual Studio 2013 RTM and Update 2.

 

Get the update today

You can download Update 2, along with the full Visual Studio RTM, as an ISO from the Microsoft website. You can find all Visual Studio downloads here.

If you are serious about making better Windows and Web applications you might also want to check out the Infragistics developer tools here, including our Ultimate and Professional packs.

Infragistics Ultimate

iOS - Objective-C - Advanced: Creating a Class at Runtime

$
0
0
Yes, this may be an edge case, but it is a problem that you may run into one day. For example, say you're writing an App that requires you to accept any sort of random json or xml. While you could just consume them in dictionary format, it maybe not actually feasible for you to work with data in that format. And thus i present you with a way to create a class dynamically at runtime. So the way this will work, is we'll have one method you call into that will generate a class based of a list...(read more)

Three HTML5 features developers should embrace

$
0
0

HTML5, in one form or another, has been with us since 2004. In 2009 the Web Hypertext Application Technology Working Group (WHATWG) and the World Wide Web Consortium (W3C) joined forces to work on the standard, with WHATWG focusing on the ‘living standard’ (something that is never complete, and constantly improved) and W3C responsible for the formal HTML5 specification (effectively the reference standard).

W3C plans to issue a stable release of the HTML5 specification by the end of 2014, with an updated 5.1 release coming by the end of 2016.

The vast majority of HTML5 features are supported by all major browsers, and a whole host of leading websites use it to deliver improved experiences to their users (Google often use HTML5 to showcase advanced functionality on the web). In this post we look at three specific areas of HTML5 that every developer should embrace.

Video and audio tags

Both of these tags (<video> and<audio>) attempt to provide standard browser support for in page video and audio elements, without the need for third party plugins (typically something like Adobe Flash).

Unfortunately using either tag isn’t quite as simple as it should be. Whilst all modern browsers understand the elements, they each support different codecs (the actual format of the video or audio content).

For <video>:

  1. Internet Explorer supports just MP4 format
  2. Chrome supports all three available formats - MP4, WebM, and Ogg
  3. The latest versions of Firefox now support all available formats
  4. Safari just supports MP4
  5. Opera supports WebM and Ogg

 

For <audio>:

  1. IE only supports MP3
  2. Chrome supports all three available formats - MP3, Wav, and Ogg
  3. The latest versions of Firefox now support all available formats
  4. Safari just supports MP3
  5. Opera supports WebM and Ogg

Both tags allow multiple sources to be specified, and a browser will simply play the first compatible one. So coding up the right codec for selection is simply, but you do need to provide the full set of formats to account for all browsers.

Why is this good for developers?
The web has long moved on from being static medium. Video and audio are now big parts of web content. These tags, even with slightly misaligned support for codecs, break the dependency on third party tools like Flash and provide a universal cross platform (and mobile) solution.

The Canvas element

The Canvas element is used to draw graphics directly onto a webpage. Graphics are built up using geometric shapes, text, and color. The element works on a grid system, with lines and shapes plotted accordingly. The Canvas element itself is a container for drawings, with something like JavaScript required to create the actual shapes.

Anyone who has used vector drawing software, as opposed to bitmaps, will quickly get to grips with the implementation.

Why is this good for developers?
Including native drawing support in HTML, as opposed to requiring bitmap images or SVG files, makes many design, UI, and layout tasks much easier to accomplish. Vectors easily scale with screen resolution, and have a (comparatively) tiny memory footprint.

Web storage

Web storage started off as part of the HTML5 standard, but has now been moved to its own specification. However we have included it, as it is a really important tool for those building cutting edge web applications. Supported by all major browsers, it offers two ways to store data in a web browser - session storage and local storage.

Session storage is limited to the scope and to the lifetime of a particular web page. It is designed to allow separate instances of applications to run independently from each other (a bit like two Word documents being open at the same time). Local storage persists after a browser window is closed, and is intended to act as more of a client offline storage mechanism.

Both methods expand on the principles of traditional cookie storage, but greatly increase the amount of data that can be stored (upto 25mb depending on the browser).

Why is this feature good for developers?
Web storage allows browser based applications to act more like their desktop counterparts. Not only can they access a much greater volume of data than has been possible in previous versions of HTML, but they can use this storage to implement true ‘offline’ application and data access.

If you are looking to create hybrid mobile apps that look native on every mobile device and the desktop try IgniteUI today! Clcik Here to Get Your 30 Day Free Trial of Ignite UI jQuery / HTML5 Controls.

Developer News - What's IN with the Infragistics Community? (6/2-6/8)

$
0
0

If you missed last week's social media postings from Infragistics, here's what was hot in the community!

5. 6 Tips for a Better Understanding of the User Experience (Medium.com)

4. F# Discount Code for C# Developers (jaywayco - Lost in IT Reverie)

3. When Should I Write a Property? (Fabulous Adventures in Coding)

2. Real Stories of How Estimates Destroy Value in Software Development (Software Development Today)

1. A Mathematical Proof that the Universe Could Have Formed Spontaneously From Nothing (Adafruit)

Until next time... :)

ReportPlus v3.0 released, adds dashboard sharing, rebranding exports, improved Analysis Services support and more

$
0
0
ReportPlus Mobile Business Intelligence

After months of wait we are proud to announce that ReportPlus v3.0 is available for download in the app store.  Version 3.0 represents a major release for the team; it ships several new features as well as introduces enhancements to the overall user experience of the app.

With this release the app switches business model. ReportPlus going forward becomes a subscription based app, free to download, but requires a subscription to unlock all features.  Existing users, who purchased the app in previous versions, are granted a perpetual license to use all subscription features free of charge. In order to redeem this license you must register and tap on the Restore Purchases button.

The Lite version is removed from the app store. Existing users of the Lite version will continue to be able to use it but won’t receive any updates, and are encouraged to move to the new version.

Among the list of new features there’s the following:

App Store Core

  • Folders support in the initial dashboard selector view. You can now group local dashboards in folders, making finding and managing dashboards easier.
  • Enhanced Analysis Services editor & support. Data sets retrieved from Analysis Services get a completely revamped editor, including a treeview editor for navigating the hierarchies of dimensions and measures, plus named sets, folders and measure groups support.
  • UNDO/REDO. Both in the dashboard design canvas, as in the Widget Editor you have the ability to undo and redo any action, making the learning process smoother.
  • AutoSave. The dashboards being designed is constantly saved to avoid any data loss.
  • Hourly Aggregation. Time based aggregation now goes beyond Year, Month, Day, and allows you to group records by Hour.
  • Overlay of help tooltips. In any screen if you tap the help button an overlay of tooltips with descriptive texts is displayed. Some of them link help articles.
  • Cascading filters support for widget filters and global filters. Define related filters with dependencies, such as Country>State>City, so that when users select a Country, only valid values are displayed for State, and City filters.

App Store Subscription

  • In the cloud repository to share dashboards & folders. Sync your dashboards across devices and share them with other users in such a way that they keep shared dashboards in sync.
  • Export to PDF, Word and CSV document formats. ReportPlus v3.0 goes beyond powerpoint slides when it comes to exporting and sharing in office formats.
  • Rebranding company color & logo in exported documents. Export professional looking documents with your company logo and you company color.
  • Annotations support in emailed images & exported documents. Add notes and markers in exports to highlight the big picture.
  • DIY HTML Visualizations. Visualize data sets retrieved by ReportPlus with your own html + javascript code.

Enterprise

  • Navigation Between Dashboards. You can specify one dashboard to open another dashboard passing parameters, upon certain actions such as: widget maximize, or tapping a row, or chart column. This enables drill down navigation experiences across dashboards, where one dashboards offers a broad overview, and another a greater level of detail. For instance you can create a dashboard with a Company 360 Overview, and have a Human Resources widget, and when the user maximizes the HR widget navigate to the HR Dashboard.

I will be covering in more detail all these features in a series of future blog posts. We hope you enjoy the new version, and find value in the new features. If you have any questions or feedback don't hesitate to contact us.

UXify Bulgaria – Event Recap

$
0
0

 

For the first time in Bulgaria UXify Bulgaria was held on June 7, 2014.  The conference was hosted at the Sofia Event Center.  UXify is the biggest UX community event in Bulgaria and the whole region. The event includes various levels of sessions with different target groups and featuring some of the experts in the field on designing and developing great UX.

 

What us UXify Bulgaria

  • The whole event is dedicated to User Experience. User Experience is the envisioned, expected, or actual experience of a user interacting with a technical product. A user will always have an experience whether you design for it or not. First impressions can determine if your product is a success or a failure. Good UX is about creating software products that are useful, usable, and desirable. It’s a key technology enabler and market differentiator.
  • One day conference with training from some of the best UX experts  on the previous day to help hundreds of people get
    knowledge about User Experience

 

Some statistics:

  • One-day event in Sofia, Bulgaria
  • 650 registrations
  • more than 400 attendees from 7 countries.
  • 15 sessions,
  • 3 Tracks
  • 13 speakers from three countries ( USA,  Ukraine and Bulgaria)

 

Infragistics participation:

  • Infragistics was the event organizer and main sponsor
  • Four  speakers from Infragistics – Jason Beres, Tobias Komischke , Kevin Richardson and Angel Todorov
  • Keynote speakers - Jason Beres  and Kevin Richardson


UXify Bulgaria Keynote

 

 

Sponsorship presentations

 

Tobias and Kevin are ready for their presentations

 

During the breaks…

 

 

Sessions…

 

 

Closing ceremony

 

If you want more information about the event feel free to contact the Event Admins at mmateev@infragistics.com

Follow @uxifyconf event on Twitter with hash tag   and get news on all our events with #uxify  .  Additional information can be found at the conference website - www.uxify.org

You can learn more about UXify Bulgaria if you follow us on Twitter @mihailmateev  and @Infragistics and stay in touch on Facebook, Google+, LinkedIn and Infragistics Friends User Group !

 

Warm Regards,
Team UXify Bulgaria


HTML5 Game Development Workshop–Event Recap

$
0
0

Infragistics Friends group with the help of Infragistics Inc.  and jQuery Sofia organized a training on the following topic: HTML5 Game Development.

The event was held on Sunday, June 8th at Infragistics Bulgaria Office, 110B, Simeonovsko Shosse Bul., Sofia, Bulgaria.

The objective of this course was to have attendees used open Web technologies such as HTML5, CSS3 & JavaScript to create browser based multiplayer games.

In this course, students will learn:

  • about the current state of JavaScript games
  • what are the HTML5 elements useful in game development
  • how to use HTML5 animation and CSS3 transitions
  • how to implement multiplayer gameplay

Trainer was  Stoyan Denev .

Stoyаn has gained his backend experience in the last decade in a companies like Webgate, ICYGEN and VBOX7. He has created the original prototype of M-Pin , the flagship product of Certivox, an internet security startup. He has evolved to pure web and JavaScript enthusiast before the JavaScript revolution from 2009. This enthusiasm led to his participation as a lecturer in a  web development course of SoftAcad .

 

 

Some pictures from the workshop:

 

 

 

 

A discussion during the lunch break.

 

As always, you can follow us on Twitter @mihailmateev and @Infragistics and stay in touch onFacebook,Google+andLinkedIn!

 

SQLSaturday #281 Edinburgh–BI Edition–Event Recap

$
0
0

Infragistics Inc. was a sponsor of SQLSaturday #281 – Edinburgh – BI Edition. Company provided licenses for the event raffle. 

Infragistics also was presented at SQLSaturday Edinburgh by me as a speaker.

The event was held on Saturday, June 14th  at University of Edinburgh, Pollock Halls, Edinburgh.

 

Administrator of the conference was  Jen Stirrup  - Director-At-Large (Elect) at Professional Association of SQL Server.  She organized an awesome team of volunteers who organized this awesome event, including  Allan MitchellMark Boradbent and many others.

This was the first SQLSaturday BI Edition organized in UK and in the whole Europe. Infragistics Inc. was the only one component vendor with a speaker at the conference. Participants gave a good feedback about the company presentation.  There was also an interest in the  Infragistics solutions, related to Development Tools,  Data Visualization, Enterprise Mobility and Business Solutions. Hope in the near feature to have more closer contacts with professionals, community  members and companies from this region.

 

Registration:

A discussion between speakers

 

Some of the sponsors:

 

 

Niko Carvalho Neugebauer in action..

 

The conference raffle:

 

Infragistics participation in the event:

Follow news from Infragistics for more information about new Infragistics events.

As always, you can follow us on Twitter @mihailmateev and @Infragistics and stay in touch on Facebook, Google+ andLinkedIn!

 

How to use templates to style the different nodes of the Ignite UI Tree control

$
0
0

Recently I published a blog about the changes around the template and how to use different template engines to customize the look and style of some of the Ignite UI controls. The Tree control goes under the same rules. If you want the structure of your jQuery Tree to be unique you can create a template and apply it to all of the nodes in it. In our UserVoice site we received a request for a way to style each tree node based upon a number of criteria. In the blog I will try to explain you how to achieve that.

Node’s templates

You can easily style any node by creating a template and providing it to each level of binding of the igTree. By setting the nodeContentTemplate option of the binding object, you can define custom HTML which will be shown for each node in the control. If you have read my blog about how to use different template engines with the Ignite UI controls you probably already know that you can create the template by using your favorite Template Engine and apply it to the tree. For the purpose of the sample I used the Infragistics template engine.

  1. $("#tree").igTree({
  2.     dataSource: files,
  3.     dataSourceType: "json",
  4.     checkboxMode: "triState",
  5.     bindings: {
  6.         textKey: "Text",
  7.         imageUrlKey: "ImageUrl",
  8.         nodeContentTemplate: "<a>${Text}</a><img src='http://igniteui.com/images/samples/tree/bin_empty.png' data-role='delete-node' title='Delete this node.' /><img src='http://png.findicons.com/files/icons/1156/fugue/16/plus.png' data-role='add-node' title='Add a new node.'/>",
  9.         childDataProperty: "Folder",
  10.         bindings: {
  11.             textKey: "Text",
  12.             imageUrlKey: "ImageUrl",
  13.             nodeContentTemplate: "<a>${Text}</a><img src='http://png-4.findicons.com/files/icons/1715/gion/16/dialog_cancel.png' data-role='delete-node'/><img src='http://png.findicons.com/files/icons/1156/fugue/16/plus.png' data-role='add-node' />",
  14.             childDataProperty: "Folder",
  15.             bindings: {
  16.                 textKey: "Text",
  17.                 imageUrlKey: "ImageUrl",
  18.                 nodeContentTemplate: "<a>${Text}</a><img src='http://png.findicons.com/files/icons/1689/splashy/16/remove_minus_sign.png' data-role='delete-node'/><img src='http://png.findicons.com/files/icons/1156/fugue/16/plus.png' data-role='add-node' />"
  19.             }
  20.         }
  21.     }
  22. });

This is how you can create a hierarchical  tree structure and use different template for the separate levels of binding. When you add new child nodes they will be styled according to the template on the  relevant level of the tree.

  1. //remove a node
  2. $(document).on('click', 'img[data-role=delete-node]', function () {
  3.     var node = $(this).closest('li');
  4.     $('#tree').igTree('removeAt', node.attr('data-path'));
  5. });
  6. //add new node
  7. $(document).on('click', 'img[data-role=add-node]', function () {
  8.     var node = $(this).closest('li');
  9.     $('#tree').igTree('addNode', { Text: 'New Node' }, node);
  10. });

Image:

igTree

Check out the live demo in jsFiddle.

Using conditional template

In the online documentation you can find a detailed step by step guidance how to add and remove nodes from the igTree control. We are going to use a context menu that offers choices such as adding a new node and deleting a node. For more information on how to create a context menu you can read the “The Infragistics Tree with a Context Menu” blog. Let’s see how to apply a predefined template when we add new sibling nodes or new child nodes.

We are going to create a condition template and initialize the igTree first.

Template:

  1. <scriptid="template"type="text/template">
  2.     {{if${Type}=="MusicFolder"}}
  3.     <imgsrc="http://igniteui.com/images/samples/tree/book.png">
  4.     {{elseif${Type}=="PictureFolder"}}
  5.     <imgsrc="http://igniteui.com/images/samples/tree/coins.png">
  6.     {{elseif${Type}=="DocumentFolder"}}
  7.     <imgsrc="http://igniteui.com/images/samples/tree/documents-folder.png">
  8.     {{elseif${Type}=="Computer"}}
  9.     <imgsrc="http://igniteui.com/images/samples/tree/computer.png">
  10.     {{elseif${Type}=="MusicFile"}}
  11.     <imgsrc="http://igniteui.com/images/samples/tree/music.png">
  12.     {{elseif${Type}=="DocumentFile"}}
  13.     <imgsrc="http://igniteui.com/images/samples/tree/documents.png">
  14.     {{elseif${Type}=="PictureFile"}}
  15.     <imgsrc="http://igniteui.com/images/samples/tree/coins_add.png">
  16.     {{else}}
  17.     <imgsrc="http://igniteui.com/images/samples/tree/documents-folder.png"/>
  18.     {{/if}}
  19.     ${Text}
  20. </script>

Applying it for the template:

  1. $("#tree").igTree({
  2.     dataSource: files,
  3.     dataSourceType: "json",
  4.     checkboxMode: "triState",
  5.     bindings: {
  6.         nodeContentTemplate: $("#template").html(),
  7.         childDataProperty: "Folder"
  8.     }
  9. });

Image:

igTree with template

As you can see from the above code snippet we have created a simple template with conditions which determine which image to be used for the particular node. This way you can easily create different appearance for the nodes based upon a number of criteria.

Now let’s start with adding a sibling node. First we are going to create a menu with a dialog with by using the igDialog, igEditor, igCombo and igButton controls. Because the purpose of the blog is to show you how to implement and use template for the different nodes, I’m going to focus on the event that is triggered when the save button is selected.  What happens there is: The User selects “Add new sibling” and a dialog window appears asking for a name and type for the new node(it is important to set the type for the node because the image for the node will be determined based upon it) and to save it. When you select the save button we take the value that you have filled in the editor’s input and assign it to the “Text” variable in the predefined array that contains the data we want to add in the tree structure.

  1. var newFolders = [{ Text: "Smth", Value: "File",Type:"",  Folder: "" }];

Then we use the addNode method. This method uses three parameters –node, parent and node index . To the node parameter (which specifies the data used to create the new nodes) we assign the new data with the changed text option. The other two parameters are optional. One is used to specify the jQuery object of the parent node the nodes are to be appended to and the other specifies the index at which the node to be inserted. We are going to use the first one and by using the parentNode method we will extract the element on the required level.

By using this addNode method the new node will go through the template that we use for the original rendering of the igTree.

Initialization of the Save button:

  1. $("#btnSave").igButton({
  2.     labelText: "Save",
  3.     click: function () {
  4.         if ($("#newValue").igEditor("validate")) {
  5.             var newItem = newFolders.clone();
  6.             newItem[0].Text = $("#newValue").val();
  7.             var type = $("#combo").igCombo("value");
  8.             type = type.replace(/\s/g, '');
  9.             
  10.             newItem[0].Type = type;
  11.             $("#tree").igTree("addNode", newItem,
  12.                 $("#tree").igTree("parentNode", node.element)
  13.             );
  14.             $("#dialog").igDialog("destroy");
  15.             $("#dialog").remove();
  16.         }
  17.     }
  18. });

Image:

Adding sibling node to igTree

The situation with adding a child node is similar the only difference occurs on the third parameter of the addNode method. You don’t have to use the parentNode method here, you just need the node element.

Adding a child node element:

  1. $("#btnSave").igButton({
  2.     labelText: "Save",
  3.     click: function () {
  4.         if ($("#newValue").igEditor("validate")) {
  5.             var newItem = newFolders.clone();                        
  6.             newItem[0].Text = $("#newValue").val();
  7.             var type = $("#combo").igCombo("value");
  8.             type = type.replace(/\s+/g, '');
  9.             newItem[0].Type = type;
  10.             $("#tree").igTree("addNode", newItem, node.element);
  11.             $("#dialog").igDialog("destroy");
  12.             $("#dialog").remove();
  13.         }
  14.     }
  15. });

Image:

Adding a child node to igTree

Summary

The Ignite UI Tree control simplifies the presentation of your hierarchical data into a web-based tree structure. By applying a template to the control you can easily style the nodes and even more you can create the template by using any available template engine such as jsRender, Handlebars, Mustache and others. 

You can see a working demo on jsFiddle.

 

You can follow us on Twitter @Infragistics and stay in touch on Facebook, Google+ and LinkedIn!

iOS Quick Tip: Create a UILabel Where Each Letter in the String is a Different Color

$
0
0
In iOS 6, Apple introduced the NSMutableAttributedString class. Along with it, all of their UIViews which previously exposed a text property, now expose an "attributedText" property. Recently I was working on an App, where the design required each character in a string to be a different color. Using attributed strings it turned out to be really simple, so i thought i'd share my solution with you today. You can simply copy this method into your project and use it as necessary, it just...(read more)

Mobile Access to Analysis Services Reloaded with ReportPlus v3.0

$
0
0

As I mentioned in the release blog post of ReportPlus v3.0, we have invested in improving the overall experience of working with Analysis Services cubes from mobile devices, to define queries, and author dashboards with the result of those queries.

Specifically in version 3.0 of ReportPlus support for Analysis Services connections has been improved in the following ways:

New Tree Editor for Hierarchies and Measures

The user interface to edit connections to cubes has been improved to introduce a tree editor to navigate the hierarchies of a cube’s dimensions, and measures. The area for the dimensions navigator has been extended, and can be customized with the slider. When the visualizations panel is expanded the tree view display is resized automatically.

ReportPlus AnalysisServices Editor

Named Sets Support

Analysis Services allows the user to group information in a cube in a structure called named sets, which simplify the querying process. This user defined structures are supported with version 3.0 of ReportPlus.

Folders and Measure Groups

Support is introduced for groupings of metrics in cubes using folders and measure groups.

Calculated Fields for Analysis Services

The ability to add new calculated fields in Analysis Services data sources is introduced in this version. For instance if a query from a cube retrieves sales from America, EMEA, Australia, China and Japan, a new field named APAC which adds sales for Australia, China and Japan can be added.

Viewing all 2460 articles
Browse latest View live