<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.infragistics.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'MVC' and 'Hierarchical Grid'</title><link>http://forums.infragistics.com/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=MVC,Hierarchical+Grid&amp;orTags=0</link><description>Search results matching tags 'MVC' and 'Hierarchical Grid'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>jQuery Grids and Responsive Web Design</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2013/04/12/jquery-grids-and-responsive-web-design.aspx</link><pubDate>Fri, 12 Apr 2013 18:37:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:399957</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;&lt;img title="Responsive Web Design and jQuery Grids" style="float:left;margin:0px 5px 0px 0px;display:inline;" alt="Responsive Web Design and jQuery Grids" align="left" src="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-web-design.png" /&gt;Responsive Web Design has been abuzz for some time now. In case you just now clash with the term, it’s a &lt;a title="Responsive web design - Wikipedia" href="http://en.wikipedia.org/wiki/Responsive_web_design" target="_blank"&gt;web design approach aimed at crafting sites to provide an optimal viewing experience across a wide range of devices&lt;/a&gt;. Basically, a CSS3 / JavaScript / jQuery powered&amp;nbsp; site that adjusts itself to better suit the screen it’s on, with the added bonus of keeping a single code base. What’s not to like? Well besides it’s often abbreviated ‘RWD’ which outside of the IT fields stands for &lt;a href="http://en.wikipedia.org/wiki/Rear-wheel_drive"&gt;Rear-wheel drive&lt;/a&gt;, so slightly confusing for people into both.. but that’s a minor issue. Other than that, it’s pretty awesome, but also sometimes hard to implement – some elements of a Web app simply don’t handle well squishing into smaller spaces. Complicated enterprise applications might even require quite a bit of extra work – and as you know with &lt;a title="Ignite UI: JavaScript / jQuery &amp;amp; HTML5 UI Framework" href="http://www.infragistics.com/products/jquery/" target="_blank"&gt;Ignite UI&lt;/a&gt; we want to help you get the extra work out of the way! And what do heavy business apps use? Grids, of course! &lt;/p&gt; &lt;p&gt;Now, how do you imagine a big table with a few columns and at least a few hundred rows is to fit in portrait mode on tablets and event more so on phones? The limited space calls for some changes and I’m quite excited to tell you your jQuery Grids will soon (and I mean soon – 13.1 is right around the corner) be equipped with the Responsive feature, ready to fit right into your RWD site! Do I hear clapping? Yeah, that’s not some simple data table we are talking about here – a full-fledged, &lt;a title="Ignite UI jQuery Grid" href="http://www.infragistics.com/products/jquery/grid/" target="_blank"&gt;feature-packed jQuery Data Grid&lt;/a&gt; and its &lt;a title="http://www.infragistics.com/products/jquery/hierarchical-grid/" href="http://www.infragistics.com/products/jquery/hierarchical-grid/" target="_blank"&gt;Hierarchical version&lt;/a&gt; – they can do so much you might as well just make a whole app out of them. A &lt;strong&gt;responsive&lt;/strong&gt; app!&lt;/p&gt; &lt;p&gt;Lastly, if you are in for a quick start with the whole toolset and related concepts you can &lt;a title="Get Started Learning Ignite UI Today!" href="http://www.infragistics.com/community/blogs/craig_shoemaker/archive/2013/03/06/get-started-learning-ignite-ui-today.aspx" target="_blank"&gt;Get Started Learning Ignite UI Today!&lt;/a&gt; The more you know, the more exciting this will be.&lt;/p&gt; &lt;h1&gt;What can it do for you and what can you do with Responsive!&lt;/h1&gt; &lt;p&gt;The main star of the Responsive feature is allowing you to know in what ‘state’ the app is running and define separate grid and column settings for each to make the best of whatever space you have. For example only do a few major columns for a phone view, some more for a tablet:&lt;/p&gt; &lt;p&gt;&lt;a title="The Ignite UI Grid with 3 columns visible in phone mode" href="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-phone.png"&gt;&lt;img title="The Ignite UI Grid with 3 columns visible in phone mode" style="margin:0px 25px 0px 0px;" alt="The Ignite UI Grid with 3 columns visible in phone mode" src="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-phone-thumb.png" /&gt;&lt;/a&gt;&lt;a title="The Ignite UI Grid in tablet mode" href="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-tablet.png"&gt;&lt;img title="The Ignite UI Grid in tablet mode" alt="The Ignite UI Grid in tablet mode" src="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-tablet-thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And the all the extra stuff when you have the space:&lt;/p&gt; &lt;p&gt;&lt;a title="The Ignite UI Grid with all columns visible in desktop mode" href="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-desktop.png"&gt;&lt;img title="The Ignite UI Grid with all columns visible in desktop mode" alt="The Ignite UI Grid with all columns visible in desktop mode" src="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/jquery-grid-responsive-desktop-thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The feature allows you to trigger column visibility based on CSS classes – with a slight nod towards those familiar with or already using popular responsive UI frameworks like Twitter Bootstrap. The RWD Grid comes with 3 modes (mode recognizers if you will, we can work on the naming), that are used to match predefined or custom states ( such as ‘phone’, ‘tablet’ and desktop). Mode Recognizers if you will, but we can work on the naming:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Responsive mode – the base  &lt;li&gt;Infragistics mode  &lt;li&gt;Bootstrap mode&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The base implementation looks at the window width, but the Infragistics and Bootstrap profiles rely on CSS3 media classes through a set of classes. Actually here is where Bootstrap comes with their set of media queries and specific classes, that many of you should find familiar. It’s not as simple as putting CSS classes on table cells, though! The igGrid is way too complex for that, but the Responsive feature does the next best thing – hiding columns thought the API methods and detecting when to do that using the class on a test element. I actually love this technique, because that’s how you do a ‘matchMedia’ polyfill (because &lt;a title="Can I use... :  CSS3 Media Queries /  matchMedia" href="http://caniuse.com/#search=media%20quer" target="_blank"&gt;most mobile browsers support media queries, but not &amp;#39;matchMedia&amp;#39;&lt;/a&gt;) and I always thought it was super clever workaround. But anyways, the point is that though CSS you can define when columns will be visible and the grid will do the rest for you. I’ll actually just include a shot of the Twitter Bootstrap description that should be clear enough:&lt;/p&gt; &lt;p&gt;&lt;a title="Twitter Bootstrap&amp;#39;s Responsive utility classes" href="http://twitter.github.io/bootstrap/scaffolding.html#responsive" target="_blank"&gt;&lt;img title="Twitter Bootstrap&amp;#39;s Responsive utility classes" alt="Twitter Bootstrap&amp;#39;s Responsive utility classes" src="http://media.infragistics.com/community/Release/13.1/jQuery/responsive-grid/bootstrap-responsive-utility-classes.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Basically what you do is have you classes in CSS - the ones that come with Bootstrap as above, or the ones from Ignite UI CSS that are pretty much the same, but with out usual “ui-“ prefix, so it’s “ui-visible-phone” and so on. Basically, you need the classes in there – if you are using Bootstrap – great, you can reuse, otherwise we will provide you with them. Those classes are assigned in the column settings on the feature (remember, they are for the test element only) and it really is as simple as adding the Responsive feature to your grid with settings similar to this:&lt;/p&gt; &lt;div id="codeSnippetWrapper" style="overflow:auto;cursor:text;border-top:silver 1px solid;height:108px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;border-right:silver 1px solid;border-bottom:silver 1px solid;padding-bottom:4px;direction:ltr;text-align:left;padding-top:4px;padding-left:4px;margin:20px 0px 10px;border-left:silver 1px solid;padding-right:4px;max-height:200px;width:97.5%;background-color:#f4f4f4;"&gt;&lt;pre id="codeSnippet" style="border-top-style:none;overflow:visible;border-left-style:none;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;border-bottom-style:none;color:black;padding-bottom:0px;direction:ltr;text-align:left;padding-top:0px;border-right-style:none;padding-left:0px;margin:0em;padding-right:0px;width:100%;background-color:#f4f4f4;"&gt;features : [{&lt;br /&gt;        name : &lt;span style="color:#006080;"&gt;&amp;#39;Responsive&amp;#39;&lt;/span&gt;,&lt;br /&gt;        columnSettings : [{&lt;br /&gt;            columnKey : &lt;span style="color:#006080;"&gt;&amp;#39;name&amp;#39;&lt;/span&gt;,&lt;br /&gt;            classes: &lt;span style="color:#006080;"&gt;&amp;quot;ui-visible-phone&amp;quot;&lt;/span&gt;&lt;br /&gt;        }]&lt;br /&gt;        //....&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;Or you can even configure visibility though simple properties that match the mode’s profiles:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow:auto;cursor:text;border-top:silver 1px solid;height:167px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;border-right:silver 1px solid;border-bottom:silver 1px solid;padding-bottom:4px;direction:ltr;text-align:left;padding-top:4px;padding-left:4px;margin:20px 0px 10px;border-left:silver 1px solid;padding-right:4px;max-height:200px;width:97.5%;background-color:#f4f4f4;"&gt;&lt;pre id="codeSnippet" style="border-top-style:none;overflow:visible;border-left-style:none;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;border-bottom-style:none;color:black;padding-bottom:0px;direction:ltr;text-align:left;padding-top:0px;border-right-style:none;padding-left:0px;margin:0em;padding-right:0px;width:100%;background-color:#f4f4f4;"&gt;&lt;span style="color:#008000;"&gt;// ...&lt;/span&gt;&lt;br /&gt;features : [{&lt;br /&gt;        name : &lt;span style="color:#006080;"&gt;&amp;#39;Responsive&amp;#39;&lt;/span&gt;,&lt;br /&gt;        {&lt;br /&gt;            columnKey : &lt;span style="color:#006080;"&gt;&amp;#39;BusinessEntityID&amp;#39;&lt;/span&gt;,&lt;br /&gt;            configuration: {&lt;br /&gt;                phone: {&lt;br /&gt;                    hidden: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;// ...&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;A Template for every occasion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So hiding columns is not enough? Well the Responsive feature kindly offers additional configuration options by providing templates for separate modes. You heard me right – you can swap the entire grid template on every mode and in the same configuration as above, where you define state for modes, you can also add column template specific to each mode! So that’s quite something – with templates you can change the look and feel of the entire grid between modes – shift controls templated into cells back to data or the other way around, merge columns and more! Just keep in mind the row templates are final and will override column ones if mixed.&lt;/p&gt;
&lt;h1&gt;Customizable, we need it to be customizable!&lt;/h1&gt;
&lt;p&gt;And so we hear – there’s a whole bunch of settings you can change for way the feature works. The sheer fact that the responsive modes can be quite a few – you can use the classes and have the designer decide thought media queries when exactly should the modes be triggered! That in itself sounds like a good foundation to keep design consideration out of the code. &lt;/p&gt;
&lt;p&gt;Then you also have the option to create your own modes… for example have one specially targeted at “phablets” or something like this or any custom width and CSS media query you can think of. You can also extend and define your own mode recognizers (profiles) where you can not only define custom modes, but also use custom logic to say when they are active. That means you responsive grid doesn’t need to depend on CSS or not even on window width..it can be anything you see fit!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Eventful&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Well, it’s not just automatic column hiding and template switching.. There’s a whole lot more! The numerous events you can react to are simply a powerhouse of a customization point – you can react to mode changes or even to separate columns going away or coming into view – either way at any point you can perform additional work to improve you app’s experience! You can reduce page sizes, group records, filter, sort or anything you deem helpful. You can even use the Responsive feature events as hooks for script-related modifications of your entire page/app – after all it’s already monitoring the state of the device, you might as well make full use of that! As you can imagine there are great many possibilities of what you can do.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Settings&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Besides the elaborate per-column configuration and per-mode settings already mentioned, the Responsive feature doesn’t have that much:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A general setting that will ensure the grid will stretch the full 100% of its parent, overriding other settings.&lt;/li&gt;
&lt;li&gt;A sensitivity setting defining just how much of a change there should be before the feature would react to changes in window width. Performance implications here obviously.&lt;/li&gt;
&lt;li&gt;And finally the option to disable monitoring container resizes as a whole – again some performance gains and pretty much the difference between a responsive and fluid behavior. If you are interested in that sort of stuff check out the info for our conference below.&lt;/li&gt;&lt;/ul&gt;
&lt;h1&gt;Power to the user&lt;/h1&gt;
&lt;p&gt;Trust me when I say I appreciate every effort a developer has made to improve my experience using a site and I get annoyed when I have to scroll left and right to read a single sentence. But then again, I’m also a user who doesn’t like his capabilities being taken away unconditionally. Yes, responsiveness can bring better experience, but only if you don’t take away from important content and functionality without the option to get them back. Basically, I hate when something gets hidden permanently on some mobile device and I can’t find it. It’s infuriating, even more so with RWD where I can’t just skip to the desktop version and make do. &lt;/p&gt;
&lt;p&gt;In the case of the Ignite UI Grid that would mean using the Responsive feature to hide columns that might contain required information. There’s usually a reason for that data to be there and simply removing it from the picture just cuts of functionality from the app! Best part is that the &lt;a title="Column Hiding feature - Ignite UI Grid samples" href="http://www.infragistics.com/products/jquery/sample/grid/column-hiding-basic"&gt;Column Hiding feature&lt;/a&gt; will provide the UI when Responsive kicks in for free:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infragistics.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damyan_5F00_petev.metablogapi/0640.jquery_2D00_grid_2D00_responsive_2D00_column_2D00_hiding_5F00_3839C926.png"&gt;&lt;img title="Column Hiding UI with Responsive feature" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="Column Hiding UI with Responsive feature" src="http://www.infragistics.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damyan_5F00_petev.metablogapi/8407.jquery_2D00_grid_2D00_responsive_2D00_column_2D00_hiding_5F00_thumb_5F00_3761633C.png" width="344" height="197" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is something I personally can’t see such a feature without. So, in case you are hiding columns, please consider giving the user the option to control what he’s seeing. &lt;/p&gt;
&lt;h1&gt;Resources&lt;/h1&gt;
&lt;p&gt;This has been more a general overview of the Ignite UI jQuery Grids’ Responsive feature aimed at Responsive Web Design (RWD) and a kind of a teaser for the upcoming 13.1 goodness. I’ll be making some more blogs with more code, demos and tricks very soon, so stay tuned!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a title="Get Started Learning Ignite UI Today!" href="http://www.infragistics.com/community/blogs/craig_shoemaker/archive/2013/03/06/get-started-learning-ignite-ui-today.aspx" target="_blank"&gt;Get Started Learning Ignite UI Today!&lt;/a&gt; (yes, yes, again!) 
&lt;li&gt;All the awesomeness coming you way: 
&lt;p&gt;&lt;a title="Ignite UI: What&amp;rsquo;s New in 13.1 HTML5, jQuery &amp;amp; ASP.NET MVC Controls" href="http://www.infragistics.com/community/blogs/jason_beres/archive/2013/03/25/ignite-ui-what-s-new-in-13-1-html5-jquery-amp-mvc-controls.aspx" target="_blank"&gt;Ignite UI: What’s New in 13.1 HTML5, jQuery &amp;amp; ASP.NET MVC Controls&lt;/a&gt;&lt;/p&gt;
&lt;li&gt;As always Free Trial is available and it will soon be serving up 13.1 code for you to try!&lt;br /&gt;&lt;a title="Donwload your Ignite UI Free Trial now!" href="http://www.infragistics.com/products/jquery/downloads" target="_blank"&gt;&lt;img title="Donwload your Ignite UI Free Trial now!" alt="Donwload your Ignite UI Free Trial now!" src="http://media.infragistics.com/community/Release/12.2/jQuery/IgniteUI-download.jpg" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Just in case you are joining us tomorrow for a day filled with JavaScript related talks at &lt;a title="JavaScript Saturday: Sofia, Bulgaria." href="http://jssaturday.com/sofia/home" target="_blank"&gt;JS Saturday&lt;/a&gt; and the topic of Responsive Web Design and Fluid design interest you – make sure to visit the session by our very own &lt;a href="http://jssaturday.com/sofia/speakers.html#konstantinDinev"&gt;Konstantin Dinev&lt;/a&gt;!&lt;br /&gt;&lt;a title="JavaScript Saturday: Sofia, Bulgaria." href="http://jssaturday.com/sofia/home.html"&gt;&lt;img title="JavaScript Saturday: Sofia, Bulgaria." style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="JavaScript Saturday: Sofia, Bulgaria." src="http://www.infragistics.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damyan_5F00_petev.metablogapi/0640.jssaturday_2D00_logo_5F00_48D1C414.png" width="606" height="253" /&gt;&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;
&lt;p name="gotcha"&gt;I’d love to hear some thoughts, so leave a comment down below or &lt;a title="That would be me!" href="https://twitter.com/DamyanPetev"&gt;&lt;em&gt;@DamyanPetev&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p name="gotcha"&gt;&lt;em&gt;And as always, you can follow us on Twitter &lt;/em&gt;&lt;a title="Infragistics on Twitter" href="https://twitter.com/infragistics" target="_blank"&gt;&lt;em&gt;@Infragistics&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and stay in touch on &lt;/em&gt;&lt;a title="Infragistics on Facebook" href="http://www.facebook.com/infragistics" target="_blank"&gt;&lt;em&gt;Facebook&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a title="Infragistics on Google+" href="https://plus.google.com/110651137371189140377" target="_blank"&gt;&lt;em&gt;Google+&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &lt;/em&gt;&lt;a title="Infragistics on LinkedIn" href="http://www.linkedin.com/company/16069" target="_blank"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt;&lt;em&gt;!&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Ignite UI jQuery Grid Column Moving</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2013/02/22/ignite-ui-jquery-grid-column-moving.aspx</link><pubDate>Fri, 22 Feb 2013 16:47:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:393798</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;&lt;img title="Ignite UI jQuery Grid with Column Moving feature. Dropdown menu visible on the shot." style="float:left;margin:0px 5px 0px 0px;display:inline;" alt="Ignite UI jQuery Grid with Column Moving feature. Dropdown menu visible on the shot." align="left" src="http://media.infragistics.com/community/Release/12.2/jQuery/ignite-ui-grid-column-moving/ignite-ui-jquery-grid-column-moving.png" /&gt;The Grid is one of Ignite UI’s bread and butter controls and its feature set just.. keeps growing! I guess that fact that Infragistics has done quite a few grid controls over the years helps. Ome of the latest additions is the The Column Moving feature – it is still in a CTP stage for the current release (not for long I should add, 13.1 is coming our way!). It’s a really simple feature at first glance as with other ‘simple’ Grid features they turn out to be not that simple. In all seriousness, there’s barely such a thing as ‘simple’ grid feature because of the way event the smallest change can have impact on multiple other modules. And while there might be some odd end to polish, you can start using the feature now or at the very least get to know it a little. &lt;/p&gt; &lt;p&gt;The Column Moving allows the users to change the order of columns. From a user standpoint things are pretty well rounded – they can simple pick column headers and drag them to the desired position or open up a menu with convenient shortcuts as seen on the shot to the side here. Finally, an additional dialog with columns listed in order to be tweaked (interestingly enough inside is an &lt;a title="Ignite UI jQuery Tree control" href="http://www.infragistics.com/products/jquery/tree" target="_blank"&gt;Ignite UI Tree&lt;/a&gt; with drag and drop enabled nodes from the columns).&lt;/p&gt; &lt;h1&gt;Getting started&lt;/h1&gt; &lt;p&gt;As a developer you’d be pretty happy to find things are kept as easy as can be – enabling such a feature is straightforward – when &lt;a title="Using JavaScript Resouces in IgniteUI" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=Deployment_Guide_JavaScript_Resouces.html" target="_blank"&gt;referencing recourses&lt;/a&gt; make sure to include the column moving widget and the add the feature:&lt;/p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:cc433068-e9ef-4733-8c55-9b2fd75a82a4" class="wlWriterEditableSmartContent" style="float:none;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;$.ig.loader(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;igGrid.ColumnMoving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;, &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; () {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;$(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).igGrid({&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;autoGenerateColumns: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;true&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;dataSource: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:#ffff00;color:#000000;"&gt;@&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;Url.Action(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;People&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;)&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;features: [&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;name: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;ColumnMoving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;mode: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;deferred&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;type: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;render&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;    &lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;]&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;});&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;});&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;And when using the ASP.NET MVC helper you don’t need to define recourses yourself: &lt;/p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:59a5b4e4-f54a-4233-9dee-368e99d76609" class="wlWriterEditableSmartContent" style="float:none;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffff00;color:#000000;"&gt;@(&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;Html.Infragistics().Grid(Model).ID(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;Grid1&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).AutoGenerateColumns(&lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;true&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;)&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;.Features(feature =&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;feature.ColumnMoving().Mode(&lt;/span&gt;&lt;span style="background:#ffffff;color:#2b91af;"&gt;MovingMode&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;.Immediate).MoveType(&lt;/span&gt;&lt;span style="background:#ffffff;color:#2b91af;"&gt;MovingType&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;.Dom);&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;})&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;.DataBind()&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;.Render()&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffff00;color:#000000;"&gt;)&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;Perhaps you’ve notice the subtle differences between the two in term of settings – the Column Moving has two modes and two more modes we call types &lt;img class="wlEmoticon wlEmoticon-smile" style="border-top-style:none;border-left-style:none;border-bottom-style:none;border-right-style:none;" alt="Smile" src="http://www.infragistics.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damyan_5F00_petev.metablogapi/8030.wlEmoticon_2D00_smile_5F00_4622A374.png" /&gt;. The DOM move type will instruct the feature to move only the affected table cells (&amp;lt;td&amp;gt; nodes) in the &lt;a title="Document Object Model - Wikipedia" href="http://en.wikipedia.org/wiki/Document_Object_Model" target="_blank"&gt;DOM tree&lt;/a&gt;. The other type will move the columns in the data source and then renders the grid again. More on that later on.&lt;/p&gt; &lt;p&gt;The immediate vs. deferred only affects the drag and drop interaction when moving and as you can imagine immediate just moves the column constantly as you drag it around. The deferred only moves on release and in the mean time it provides only an indicator where you’d be dropping that column:&lt;/p&gt; &lt;p&gt;&lt;img title="Column Moving feature in deferred mode with an indicator while dragging." alt="Column Moving feature in deferred mode with an indicator while dragging." src="http://media.infragistics.com/community/Release/12.2/jQuery/ignite-ui-grid-column-moving/grid-deferred-column-moving.png" /&gt;&lt;/p&gt; &lt;p&gt;Pretty simple, no? I find the immediate drag &amp;amp; drop reaction more immersive, don’t know just feels like that for me – but it comes at a price of doing a lot of extra movement in between, that can be otherwise omitted. The thing to note here is that the immediate mode (as duly noted in its &lt;a title="igGrid Column Moving - Ignite UI API REFERENCE" href="http://help.infragistics.com/jQuery/2012.2/ui.iggridcolumnmoving#options" target="_blank"&gt;jQuery API&lt;/a&gt;) doesn’t really mix well with the ‘render’ type – imagine dragging around the column header and have the grid underneath re-rendering constantly. It’s just too much of a hassle to attempt to compensate for that, so when mode is immediate, the type will only be ‘dom’ (even if you choose ‘render’).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Control&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Out of the twofold nature of the interaction with the feature come two additional settings – you can turn on and off the the additional move menu globally, or both with the drag &amp;amp; drop capabilities on per column basis. The menu is integrated with the &lt;a title="Feature Chooser - Ignite UI&amp;trade; Online Help ::  2012.2" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=igGrid_Feature_Chooser.html" target="_blank"&gt;Feature Chooser&lt;/a&gt;, which is to say that if there are other features using it (such as Column Hiding), disabling the move menu will only remove the relevant parts to that feature. This is done globally though the ‘addMovingDropdown’ setting:&lt;/p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:80130be3-9201-453d-a629-b86b92eecaac" class="wlWriterEditableSmartContent" style="float:none;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:100px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#008000;"&gt;//....&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;    &lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;features: [&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;name: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;ColumnMoving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;addMovingDropdown: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;    &lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;]&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#008000;"&gt;//.....&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;The per-column settings also let you can disallow the drag and drop functionality for the column (since it’s based on &lt;a title="jQuery UI Draggable" href="http://jqueryui.com/draggable/" target="_blank"&gt;jQuery UI Draggable&lt;/a&gt; it means that the widget will not be initialized for the column) in addition to the menu:&lt;/p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b304fcb8-8044-45a2-bf3e-4b3cdf26944b" class="wlWriterEditableSmartContent" style="float:none;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:100px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#008000;"&gt;//....&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;    &lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;features: [&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;name: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;ColumnMoving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;columnSettings: [&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                        &lt;span style="background:#ffffff;color:#000000;"&gt;columnKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;Demographics&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                        &lt;span style="background:#ffffff;color:#000000;"&gt;allowMoving: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;false&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;                &lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;]&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;]&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#008000;"&gt;//....&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;Note this doesn’t really fix the column in it’s place – as I explained it merely doesn’t create the draggable widget and Feature chooser menu for that column. However, since other columns can move, they can and probably will push that column out of it’s place. Also the API method can move that column regardless. &lt;/p&gt; &lt;h1&gt;Notes, tips and tricks&lt;/h1&gt; &lt;p&gt;The feature offers a single method, but a ton of settings and events you can make use of in creating amazing grid experiences. There are some options that probably didn’t make it to the &lt;a title="igGrid Column Moving - Ignite UI API REFERENCE" href="http://help.infragistics.com/jQuery/2012.2/ui.iggridcolumnmoving#options" target="_blank"&gt;jQuery API page&lt;/a&gt;(happens, being CTP and all):&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The hidden settings&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The column header users drag can be made transparent though the ‘dragHelperOpacity’ as it is exactly that the helper for the jQuery UI Draggable and this directly corresponds to the opacity property.&lt;/p&gt; &lt;p&gt;There are two tolerance settings for this feature and they are both only regarding the Drag&amp;amp;Drop interaction side of Column Moving – besides letting you dragging the header around the feature is also kind enough to scroll the grid for you when you go near the edge. The edge is actually a distance threshold defined by the ‘movingScrollTolerance’ property (length (in pixels) below which horizontal scrolling occurs) and supported by ‘scrollDelta’ that dictated how much should be scrolled each time.&lt;/p&gt; &lt;p&gt;Then you also have the ‘movingAcceptanceTolerance’ which is how the feature checks if you are close to a possible column drop point and the column/indicator should be moved there. I think a visual explanation will be great for this. The default accept tolerance is 20px which means that if the edge of the helper moves closer that that to some edge, that edge will be accepted as target position for column moving, see what I mean:&lt;/p&gt; &lt;p&gt;&lt;img title="The Column Moving accept tolerance of 20px visualized as a green-ish area, that once crossed by the drag helper will cause a colum/incidator move." alt="The Column Moving accept tolerance of 20px visualized as a green-ish area, that once crossed by the drag helper will cause a colum/incidator move. " src="http://media.infragistics.com/community/Release/12.2/jQuery/ignite-ui-grid-column-moving/grid-column-moving-tolerance.png" /&gt;&lt;/p&gt; &lt;p&gt;There’s a very important note for the tolerance settings – &lt;strong&gt;use wisely and with caution&lt;/strong&gt; – imagine what will happen if you crank up the tolerance too much, like wider than your columns? The feature will totally go crazy and drag column moving will produce highly unpredictable results! I’d say those 20px as pretty confortable, but hey with great settings power comes great… you get the point!&lt;/p&gt; &lt;p&gt;The ‘hideHeaderContentsDuringDrag’ which is why the actual column header above is empty when dragging.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Multi-Column headers and hierarchy&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The Column Moving acts really well with this (&lt;a title="Multi-Column Headers - Ignite UI jQuery Gruid sample" href="http://www.infragistics.com/products/jquery/sample/grid/multi-column-headers" target="_blank"&gt;also new&lt;/a&gt;) feature and also plays nice with the &lt;a title="Hierarchical Grid Column Moving - Ignite Ui samples" href="http://www.infragistics.com/products/jquery/sample/hierarchical-grid/hierarchical-grid-column-moving" target="_blank"&gt;Hierarchical&lt;/a&gt; version of the grid. The drag helper/header is restricted within the confines of it’s respective grid (which prevents child-parent moves in the Hierarchical Grid) and won’t be accepted outside it’s column group, so the Multi header settings are respected. There are some gotcha-s here – the API move method will believe you more that the user and attempt to move whatever you tell it to wherever – yes you can move entire header by identifier, but careful with indexes – they include the group and vary inside it as well. I might do a whole blog on that later on, but for now just thoroughly test if you combine those features.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So, back to those move types. As you might&amp;#39;ve guessed there’s a reason why the move type is exposed to the developer – it has performance implications because of the ways the actual moving is performed. Remember how data is laid in the HTML table – by columns? Of course not – it’s by rows. That means finding the right cell, detaching it and re-attaching it before/after a different target cell. That’s not that bad, but consider it is done for every row each time you move a column! It can get pretty intensive. &lt;/p&gt; &lt;p&gt;The re-render, on the other hand, destroys most of the grid layout and based on the already updated data source renders the data table again. So how’s that for intensive? Well, it depends kind of… Our developers noted this and I did some very quick tests to confirm this:&lt;/p&gt; &lt;p&gt;As a general rule of thumb, &lt;strong&gt;DOM Column Moving is faster for most browsers&lt;/strong&gt;, but (surprise, surprise!) the ‘render ‘ is actually faster for IE. And, yes, I’ve tested IE10 thinking there’s probably some sort of an error, but even with small sample numbers the difference was so huge that there’s no way it’s wrong. No idea why – is it the querying of a whole bunch of elements or the DOM manipulation that’s the bottleneck, but it turns out re-rendering is faster for IE.&lt;/p&gt; &lt;p&gt;But, hey, that’s just interesting info – there’s no reason for you to worry or even consider this an issue – there’s an &lt;strong&gt;easy solution – please, please use &lt;a title="igGrid Paging - Ignite UI&amp;trade; Online Help ::  2012.2" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=igGrid_Paging.html" target="_blank"&gt;Paging&lt;/a&gt;! &lt;/strong&gt;With reasonable page size the time it takes to move a column of 2000 rows takes a plunge down to a snappy, pretty much instant, 50ms range. Trust me when I say it makes all the difference and it’s an absolute must if you plan on a lot of data. And if for whatever reason you need it all in a single view(page) then &lt;a title="Configuring Virtualization Overview  - Ignite UI&amp;trade; Online Help ::  2012.2" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=igGrid_Enabling_and_Configuring_Virtualization.html" target="_blank"&gt;&lt;strong&gt;enable Row Virtualization&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;! &lt;/strong&gt;Paging kind of delivers the same functionality and the conclusion is an old one – virtualization is totally awesome with big data and a virtualized grid handles thousands of records like a boss!&lt;/p&gt; &lt;h1&gt;Making use of events to enhance functionality&lt;/h1&gt; &lt;p&gt;Personally there’s something that bugs me about the immediate mode of the feature.. When dragging columns around in a very demo grid, with all healthy mix of easily distinguishable text/numbers mix in the columns, it’s all good and merry. But when you hit a grid with like all numbers – like it’s very likely to happen in some scenarios – I find it really hard to track my column around. There’s no indicator with immediate, the only notice really is the empty header if hasn’t been disabled or the same text following you around. Good thing the Column Moving Events are many and give you precious information needed to control and/or enhance functionality.&lt;/p&gt; &lt;p&gt;Well I figured I can show you how to events and enrich the experience at the same time. I’ve decided to cheat a bit and steal the Sorting feature indication by highlighting the column currently moving with the following class:&lt;/p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9a89fdf2-9255-444a-aac4-c4300f5fa45a" class="wlWriterEditableSmartContent" style="float:none;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:100px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#800000;"&gt;style&lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#800000;"&gt;.ui-iggrid&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;span style="background:#ffffff;color:#800000;"&gt;td.ui-state-moving&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;background&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;0&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;background-color&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;#c2e8f8&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;color&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;#333&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;font-weight&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;normal&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;text-shadow&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;0&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;1px&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;0&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;rgba(255,255,255,0.8)&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;border-color&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;#b3e2f6&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#ff0000;"&gt;border-width&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;:  &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;1px&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background:#ffffff;color:#800000;"&gt;style&lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;Two things to note here – this is almost identical to the highlight &lt;a title="Ignite UI Grid Sorting sample" href="http://www.infragistics.com/products/jquery/sample/grid/local-sorting" target="_blank"&gt;Sorting&lt;/a&gt; uses, just renamed so it won’t mess with the feature’s CSS, but if you absolutely know you won’t be using Sorting or it’s highlight, it’s safe to just apply ‘ui-state-highlight’. And secondly, if you are using it with sorting CSS you might want to consider some different colors. Having said that, applying the class is extremely easy:&lt;/p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bd4e027d-790b-4bf4-a78f-b865e6419a33" class="wlWriterEditableSmartContent" style="float:none;padding-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:200px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;        features: [&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;name: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;ColumnMoving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;mode: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;immediate&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;columnDragStart: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (event, ui) {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;ui.owner.element.find(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;tr td:nth-child(&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; + (ui.columnIndex + 1) + &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;)&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).addClass(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;ui-state-moving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;);&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;colMovingKey = ui.columnKey;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;},&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;columnDragEnd: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (event, ui) {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;var&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; grid = $(event.target).data(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;igGrid&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;);&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;var&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; newindex = grid.options.columns.indexOf(grid.columnByKey(colMovingKey)) + 1;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="background:#ffffff;color:#000000;"&gt;grid.element.find(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;tr td:nth-child(&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; + newindex + &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;)&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).removeClass(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;ui-state-moving&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;);&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;}&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;]&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;The drag start and end events correspond directly to the jQuery UI Draggable events, and they even relay most of the common arguments. The &lt;a title="Column Moving events - Ignite UI jQuery API REFERENCE" href="http://help.infragistics.com/jQuery/2012.2/ui.iggridcolumnmoving#events" target="_blank"&gt;other events&lt;/a&gt; include a column moving and moved events to react before and after a move, and then a whole bunch of events related to the additional menu and dialog.&lt;/p&gt; &lt;p&gt;The above snippet is only fit for a very basic layout (the demos include a somewhat acceptable version with multi-column headers as well, so check them out). The result looks something like this – just imagine a much bigger grid and better image quality:&lt;/p&gt; &lt;p&gt;&lt;a title="Using the events of Column Mvoing to add a highlight while dragging." href="http://jsfiddle.net/damyanpetev/B4RbW/" target="_blank"&gt;&lt;img title="Using the events of Column Mvoing to add a highlight while dragging." alt="Using the events of Column Mvoing to add a highlight while dragging." src="http://media.infragistics.com/community/Release/12.2/jQuery/ignite-ui-grid-column-moving/ignite-ui-grid-column-moving-highlight.gif" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As I always say, it’s not as much about modifying the feature, but showing you can quickly apply enhancements and control at various points of interest. And it’s that easy!&lt;/p&gt; &lt;h1&gt;Resources&lt;/h1&gt; &lt;p&gt;So besides all the links sprinkled all over, here’s a quick and useful list of info and demos:&lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;p&gt;&lt;a title="Grid Column Moving - Ignite UI Online samples" href="http://www.infragistics.com/products/jquery/sample/grid/column-moving" target="_blank"&gt;Column Moving&lt;/a&gt; and &lt;a title="Grid Column Moving API - Ignite UI Online samples" href="http://www.infragistics.com/products/jquery/sample/grid/column-moving-api" target="_blank"&gt;Column Moving API&lt;/a&gt; samples for you to check out. Also for the &lt;a title="Hierarchical Grid with Column - Ignite UI samples" href="http://www.infragistics.com/products/jquery/sample/hierarchical-grid/hierarchical-grid-column-moving" target="_blank"&gt;Hierarchical Grid with Column moving&lt;/a&gt; and &lt;a title="Hierarchical Grid Column Moving API - Ignite UI samples" href="http://www.infragistics.com/products/jquery/sample/hierarchical-grid/hierarchical-grid-column-moving-api" target="_blank"&gt;Hierarchical Grid Column Moving API&lt;/a&gt;!&lt;/p&gt; &lt;li&gt; &lt;p&gt;&lt;a title="Grid Column Moving - Ignite UI&amp;trade; jQuery API Reference" href="http://help.infragistics.com/jQuery/2012.2/ui.iggridcolumnmoving" target="_blank"&gt;jQuery API Reference for the Column Moving feature&lt;/a&gt; &lt;/p&gt; &lt;li&gt; &lt;p&gt;&lt;a title="Grid Column Moving - Ignite UI&amp;trade; ASP.NET MVC Helper API Reference" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=Infragistics.Web.Mvc~Infragistics.Web.Mvc.GridColumnMoving_members.html" target="_blank"&gt;ASP.NET MVC Helper API Reference for the Column Moving feature&lt;/a&gt; &lt;/p&gt; &lt;li&gt; &lt;p&gt;A fairly elaborate &lt;a title="ASP.NET MVC Demo - both MVC Helper and script definitions of basic grid setup, enhanced with the above highlight, and in combination with Multi-Column Headers." href="http://media.infragistics.com/community/Release/12.2/jQuery/ignite-ui-grid-column-moving/GridColumnMoving.zip" target="_blank"&gt;ASP.NET MVC Demo&lt;/a&gt; using AdventureWorks (&lt;a href="http://msdn.microsoft.com/en-us/library/ms124501(v=sql.100).aspx"&gt;&lt;img title="AdventureWorks Sample Databases (MSDN)" alt="AdventureWorks Sample Databases (MSDN)" src="http://users.infragistics.com/dpetev/external_link.PNG" /&gt;&lt;/a&gt;) with both MVC Helper and script definitions of basic grid setup, enhanced with the above highlight, and in combination with Multi-Column Headers and highlighting.&lt;/p&gt; &lt;li&gt; &lt;p&gt;&amp;nbsp;&lt;a title="Ignite UI Grid Multi-Column Moving Demo" href="http://jsfiddle.net/damyanpetev/B4RbW/" target="_blank"&gt;Multi-Column Moving Demo on JSFiddle&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/p&gt; &lt;li&gt; &lt;p&gt;And finally.. Go get yours:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p name="gotcha"&gt;&lt;a title="Donwload your Ignite UI Free Trial now!" href="http://www.infragistics.com/products/jquery/downloads" target="_blank"&gt;&lt;img title="Donwload your Ignite UI Free Trial now!" alt="Donwload your Ignite UI Free Trial now!" src="http://media.infragistics.com/community/Release/12.2/jQuery/IgniteUI-download.jpg" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p name="gotcha"&gt;I’d love to hear some thoughts, so leave a comment down below or &lt;a title="That would be me!" href="https://twitter.com/DamyanPetev"&gt;&lt;em&gt;@DamyanPetev&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt; &lt;p name="gotcha"&gt;&lt;em&gt;And as always, you can follow us on Twitter &lt;/em&gt;&lt;a title="Infragistics on Twitter" href="https://twitter.com/infragistics" target="_blank"&gt;&lt;em&gt;@Infragistics&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and stay in touch on &lt;/em&gt;&lt;a title="Infragistics on Facebook" href="http://www.facebook.com/infragistics" target="_blank"&gt;&lt;em&gt;Facebook&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a title="Infragistics on Google+" href="https://plus.google.com/110651137371189140377" target="_blank"&gt;&lt;em&gt;Google+&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &lt;/em&gt;&lt;a title="Infragistics on LinkedIn" href="http://www.linkedin.com/company/16069" target="_blank"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt;&lt;em&gt;!&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Merging Cells with the Infragistics jQuery Grids</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2012/05/03/merging-cells-with-the-infragistics-jquery-grids.aspx</link><pubDate>Thu, 03 May 2012 10:55:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:348030</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;Merged Cells is a new addition to the arsenal of features in the jQuery Grids by Infragistics, even though it is introduced as CTP (Community Technology Preview) for the first release of 2012. Like with most features this one is also realized and managed by its own widget and there are several benefits to that. For starters, that said widget doesn&amp;rsquo;t need to be loaded unless you need its functionality, combined with everything built like that - it just adds up. It also means that most of those can be shared for both the flat data and the hierarchical grid. It also attaches its functionality to the grid and the actual grid is unaware such thing is active at all. It&amp;rsquo;s is not yet polished as you&amp;rsquo;d might guess, but that shouldn&amp;rsquo;t worry you, on the contrary &amp;ndash; the whole point of these preview is us sharing what we have so far, hopefully it is something you&amp;rsquo;d like and get you excited about it, perhaps give it a try, share your thoughts, make a feature request and so on. This feature sure is exciting and it has plenty of ways to come to its own in the future, so let&amp;rsquo;s have a closer look!&lt;/p&gt;
&lt;h1&gt;Merging Cells&lt;/h1&gt;
&lt;p&gt;While I say merging cells, that might be somewhat deceiving (if you are currently imagining excel-style user operated merging of two random and unrelated cells, then yes it is deceiving, indeed). Thing is, users are not really required to do anything and this feature doesn&amp;rsquo;t allow merging of unrelated cells. What it does is combining neighbouring cells &lt;em&gt;with the same values&lt;/em&gt;. You may ask what good would that do? Well, the whole point of this feature is to provide visual aid for the user -&amp;nbsp; think of it as a visual cue that would help identifying same values by grouping or merging them in a sense. The widget will do just that &amp;ndash; merge cells in a column that are next to each other and have identical values. Again the best usage for such a feature would be to seamlessly spot &amp;ldquo;areas&amp;rdquo; with specific repeating values, with perhaps the strongest usability and benefit being after sorting. Of course, a visual feature is not fully introduced without an image. Here&amp;rsquo;s the jQuery grid displaying the usual Northwind Customers &amp;ndash; with Merged Cells enabled once you sort to stack identical values next to each other they will be nicely styled so the user can easily spot just where are those groups:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Merged_Cells/Sorted_merged_cells.png" alt="Merged cells in the grid after sorting the Country column." title="Merged cells in the grid after sorting the Country column." /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now that makes it crystal clear, doesn&amp;rsquo;t it? Moving on to how to get that feature running and what it will offer.&lt;/p&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;p&gt;As with other features, as mentioned, this one can and should be loaded when it&amp;rsquo;s needed. For that you have our own scripts and styles loader widget and all you have to do is state you want that feature as a resource along with an igGrid or igHierarchical grid:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:86f594d6-f462-4bce-94dc-dfbd4801dd4d" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt;
&lt;li&gt;$.ig.loader({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scriptPath: &lt;span style="color:#800000;"&gt;&amp;#39;../../Scipts/js/&amp;#39;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cssPath: &lt;span style="color:#800000;"&gt;&amp;#39;../../Content/css/&amp;#39;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resources: &lt;span style="color:#800000;"&gt;&amp;#39;igGrid.Paging.MergedCells.Sorting&amp;#39;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;That can as always be done using our ASP.NET (MVC) helpers and naturally you can swap the &amp;lsquo;igGrid&amp;rsquo; for &amp;lsquo;igHierarchicalGrid&amp;rsquo; in that snippet when your case requires.&lt;/p&gt;
&lt;p&gt;Setting up the feature is much like all others &amp;ndash; regardless of the rest of your grid definition, added to the features and it looks like so:&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d5351f90-186c-4c0b-90d2-a9d50bfb27f2" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;$(&lt;span style="color:#800000;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igGrid({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataSource: &lt;span style="color:#800000;"&gt;&amp;quot;Home/Customers&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//alternateRowStyles : false,&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;CustomerID&amp;quot;}&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Company Name&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;CompanyName&amp;quot;}&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Contact Name&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;ContactName&amp;quot;}&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Country&amp;quot;}&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;City&amp;quot;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: &lt;span style="color:#800000;"&gt;&amp;quot;Sorting&amp;quot;&lt;/span&gt;, type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;, mode: &lt;span style="color:#800000;"&gt;&amp;quot;multiple&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: &lt;span style="color:#800000;"&gt;&amp;quot;Paging&amp;quot;&lt;/span&gt;, pageSize: 10, type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: &lt;span style="color:#800000;"&gt;&amp;quot;MergedCells&amp;quot;&lt;/span&gt;, initialState: &lt;span style="color:#800000;"&gt;&amp;quot;merged&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}]&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;So far the feature only comes with this setting &amp;ndash; what it does is controlling when the merging effect should occur. Setting it as above to merged would cause the grid to be initialized with cells merged, meaning as soon as you load if there are neighbouring same values &amp;ndash; they get the proper treatment and it can look like:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Merged_Cells/Initial_merge.png" alt="Merged cells upon grid initialization." title="Merged cells upon grid initialization." /&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s like one country above (depends on your data after all) so not as spectacular as when you have your values sorted. And after sorting is exactly when the cell will be merged, if you leave or set that property to &amp;lsquo;regular&amp;rsquo;.&lt;/p&gt;
&lt;h1&gt;Further enhancements&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Multiple column sorting and merging&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Having the basic functionality started, notice in the grid definition above, the Sorting mode is set to multiple. That means multiple columns can be sorted. Therefore, multiple columns will have similar values next to each other and they will all have their cells merged. Here&amp;rsquo;s how that would look when you sort both countries, like above, and then cities:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Merged_Cells/Sorted_multiple_merged_cells.png" alt="Merged cells after sorting multiple columns in the grid." title="Merged cells after sorting multiple columns in the grid." /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Hierarchy&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As mentioned this widget will happily plug to the hierarchical jQuery grid as well and there are just a few twists. Merged Cells will affect child layouts if you leave the initial state to merged. However you can provide the same treatment for them as the parent grid via feature inheritance &amp;ndash; allow for sorting to be inherited. Also set the initial state of the Merged Cells feature to regular and allow for it to be inherited as well. Here&amp;rsquo;s a snippet of hot the features would look for the hierarchical grid definition:&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:652e8697-34d9-4491-b856-e84ec88dfa63" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;features: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: &lt;span style="color:#800000;"&gt;&amp;quot;Sorting&amp;quot;&lt;/span&gt;, type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;, mode: &lt;span style="color:#800000;"&gt;&amp;quot;multiple&amp;quot;&lt;/span&gt;, inherit: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: &lt;span style="color:#800000;"&gt;&amp;quot;MergedCells&amp;quot;&lt;/span&gt;, initialState: &lt;span style="color:#800000;"&gt;&amp;quot;regular&amp;quot;&lt;/span&gt;, inherit: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}]&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;And that would result in the visual separation of the values in the sorted columns for both parent and child layouts:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Merged_Cells/Sorted_multiple_hierarchical.png" alt="Merged cells in the hierarchical grid after sorting multiple columns in parent and child layouts." title="Merged cells in the hierarchical grid after sorting multiple columns in parent and child layouts." /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Events&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As expected the feature will fire events to allow you to gather information about the process and have control over it. Two events are fired one as the merging is in progress (the &amp;lsquo;-ing&amp;rsquo; which is almost always cancellable so you can prevent the operation based on some criteria) and one after a merging has occurred (&amp;lsquo;-ed&amp;rsquo;). Naturally you can use the event arguments to gain access to the grid when the feature was activated or to the widget itself or the staring row. There are also some feature-specific things that are provided for you, like the repeated value that caused cells to be grouped and how many of them were included. Here&amp;rsquo;s a sample binding to the &amp;lsquo;-ed&amp;rsquo; event:&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d612f297-ea29-4d8e-8369-892b1918a8f6" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt;
&lt;li&gt;$(document).delegate(&lt;span style="color:#800000;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;, &lt;span style="color:#800000;"&gt;&amp;quot;iggridmergedcellscellsmerged&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (evt, ui) {&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(&lt;span style="color:#800000;"&gt;&amp;quot;Merged cells with the value: &amp;quot;&lt;/span&gt; + ui.value);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(&lt;span style="color:#800000;"&gt;&amp;quot;Merged group starts from row: &amp;quot;&lt;/span&gt; + ui.rowIndex + &lt;span style="color:#800000;"&gt;&amp;quot; and includes &amp;quot;&lt;/span&gt; + ui.count + &lt;span style="color:#800000;"&gt;&amp;quot; cells.&amp;quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;h1&gt;Wrapping Up&lt;/h1&gt;
&lt;p&gt;The Merged Cells in an excellent feature to visually aid in distinguishing groups of same values in sorted columns. It makes those columns seem less cluttered, more organized by visually reducing the amount of text in them (as the greyed cells just don&amp;rsquo;t stand out as much). It all results in a more intelligible layout after sorting and actually functional and pleasing visual effect to enhance the experience for the user.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;12.1 is incredibly near! Keep an eye on the blogs, follow us on Twitter &lt;/em&gt;&lt;a href="https://twitter.com/infragistics" title="Infragistics on Twitter"&gt;&lt;em&gt;@Infragistics&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &lt;/em&gt;&lt;a href="http://www.facebook.com/infragistics" title="Infragistics on Facebook"&gt;&lt;em&gt;Facebook&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. Speaking of which - we&amp;rsquo;ve been showing you how to do some pretty awesome stuff using our controls and perhaps it&amp;rsquo;s time for you to show us your best? Follow the link above to our Facebook page for more info and enter the competition for building the best app and a chance to win an iPad3! &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: &lt;a href="http://media.infragistics.com/community/Release/12.1/jQuery/Merged_Cells/CellMergingTest.zip" title="asp.net mvc demo project for the grid cell merging"&gt;Demo Project&lt;/a&gt; available for download! Both flat and hierarchical grid implementatons using only client-side scripts as well as the MVC helper. Keep in mind you will need at least a Trial version of our&lt;a target="_blank" href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Overview" title="jQuery Controls, brilliant Data Visualization and jaw-dropping performance - part of Infragistics&amp;#39; NetAdvantage product family."&gt; jQuery controls&lt;/a&gt; (it&amp;#39;s free!) to build and run the views using the helper.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>MVVM Support with KnockoutJS in NetAdvantage for jQuery 2012 Vol.1</title><link>http://forums.infragistics.com/blogs/mihail_mateev/archive/2012/04/24/mvvm-support-with-knouckoutjs-in-netadvantage-for-jquery-2012-vol-1.aspx</link><pubDate>Tue, 24 Apr 2012 17:58:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:346448</guid><dc:creator>mmateev</dc:creator><description>&lt;p&gt;Probably many developers who have experience with XAML applications are familiar with &lt;a href="http://en.wikipedia.org/wiki/Model_View_ViewModel"&gt;Model View ViewModel (MVVM)&lt;/a&gt; design pattern. Specialists who work on WEB projects now have the opportunity to implement this pattern in the client portion of the applications using &lt;a href="http://knockoutjs.com/"&gt;KnockoutJS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user&amp;rsquo;s actions or when an external data source changes), KO can help you implement it more simply and maintainable.&lt;/p&gt;
&lt;p&gt;This article is about how to&amp;nbsp; integrate KnockoutJS with the Infragistics jQuery Grids in 12.1 release. Now with NetAdvantage for jQuery 12.1 it is possible to&amp;nbsp; take advantage of the MVVM pattern within your web applications and full two-way data binding support , both for cell/row updates, as well as add row/delete row. This post also could help XAML programmers to transit to HTML + JavaScript world, while carrying best practices such as MVVM pattern over to the new world.&lt;/p&gt;
&lt;p&gt;With Knockout you will have: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Elegant dependency tracking - automatically updates the right parts of your UI whenever your data model changes. &lt;/li&gt;
&lt;li&gt;Declarative bindings - a simple and obvious way to connect parts of your UI to your data model. You can construct a complex dynamic UIs easily using arbitrarily nested binding contexts. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Knockout is a pure JavaScript library - works with any server or client-side technology. It can be added on top of your existing web application without requiring major architectural changes. KO is a compact - around 13kb after gzipping and works on any mainstream browser (IE 6+, Firefox 2+, Chrome, Safari, others).&lt;/p&gt;
&lt;p&gt;It is a challenge for each company, that has jQuery components to put together jQuery and Knockout and offer a real MVVM support for WEB components. To be possible to support notifications when the data in ViewModel is changed, components have Knockout extensions. In NetAdvantage for jQuery 2012 Vol.1 you could find KO extensions from Infragistics jQuery Grid, Hierarchical Grid and Data Source.&lt;/p&gt;
&lt;p&gt;You will learn how to use KnockoutJS&amp;nbsp; bindings with the igGrid widget via simple ASP.Net MVC3 application. This application that provides information about the Customers from Northwind sample database. Data is stored in Microsoft SQL Server. Business objects are created via Entity Framework&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;You need to add in the project: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Infragistics 12.1 release scripts(under Scripts folder) and styles (under Content folder): &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/MetroTheme_5F00_jQuery12.1_5F00_Pic021_5F00_5364F5CC.png"&gt;&lt;img height="244" width="174" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/MetroTheme_5F00_jQuery12.1_5F00_Pic021_5F00_thumb_5F00_58D36670.png" alt="MetroTheme_jQuery12.1_Pic02[1]" border="0" title="MetroTheme_jQuery12.1_Pic02[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/MetroTheme_5F00_jQuery12.1_5F00_Pic031_5F00_7EC916C6.png"&gt;&lt;img height="244" width="161" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/MetroTheme_5F00_jQuery12.1_5F00_Pic031_5F00_thumb_5F00_369B5AEA.png" alt="MetroTheme_jQuery12.1_Pic03[1]" border="0" title="MetroTheme_jQuery12.1_Pic03[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;It&amp;nbsp; is important to not to forget Infragistics knockout extensions: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;infragistics.datasource.knockoutjs.js &lt;/li&gt;
&lt;li&gt;infragistics.ui.grid.knockout-extensions.js &lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/SteveSanderson/knockout/downloads"&gt;Knockout library&lt;/a&gt;: knockout.js (current sample uses version 2.0.0) &lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/SteveSanderson/knockout.mapping/tree/master/build/output"&gt;Knockout mapping&lt;/a&gt;: knockout.mapping-latest.js (current sample uses version 2.0) : this file is used from Infragistics knockout extensions. &lt;/li&gt;
&lt;li&gt;Northwind sample data base &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;How to start:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You need to have data: in this sample is used Entity Framework to create business objects from Northwind database&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/igDataChart_5F00_jQuery12.1_5F00_Pic011_5F00_237A2E3E.png"&gt;&lt;img height="134" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/igDataChart_5F00_jQuery12.1_5F00_Pic011_5F00_thumb_5F00_2CF2ECB4.png" alt="igDataChart_jQuery12.1_Pic01[1]" border="0" title="igDataChart_jQuery12.1_Pic01[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Knockout Extensions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Knockout extensions should be loaded as resources in your page.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;script type=&lt;span style="color:#006080;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;     $.ig.loader({&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;         scriptPath: &lt;span style="color:#006080;"&gt;&amp;quot;../../Scripts/Infragistics/js/&amp;quot;&lt;/span&gt;, &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;         cssPath: &lt;span style="color:#006080;"&gt;&amp;quot;../../Content/Infragistics/css/&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;         resources: &lt;span style="color:#006080;"&gt;&amp;quot;igGrid.*,extensions/infragistics.datasource.knockoutjs.js,extensions/infragistics.ui.grid.knockout-extensions.js&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;         theme: &lt;span style="color:#006080;"&gt;&amp;quot;metro&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;     });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MVC Controller:&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;When you want to use Infragistics jQuery components and Knockout you have no need to use ASP.Net MVC, but MVC framework helps developers to create quickly line of business applications. It also helps Windows developers to create easily WEB applications.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;In this sample MVC controller is used to maintain data.&lt;/p&gt;
&lt;p&gt;The method &amp;ldquo;Customers&amp;rdquo; is used to serialize data in JSON&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#cc6633;"&gt;#region&lt;/span&gt; Customers&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;  &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; JsonResult Customers()&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;  {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;      &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; Json(nw.Customers, JsonRequestBehavior.AllowGet);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;  }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;  &lt;span style="color:#cc6633;"&gt;#endregion&lt;/span&gt; //Customers&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Northwind data is a helper class used to deserialize JSON where data is a response data key&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; NorthwindData&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; IEnumerable&amp;lt;Customer&amp;gt; data { get; set; }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;UpdateCustomers action is used to update Northwind database. View can use use this method to pass updated data from views to the controller.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#cc6633;"&gt;#region&lt;/span&gt; UpdateCustomers&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt; [HttpPost]&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ActionResult UpdateCustomers(NorthwindData customers)&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;     var x = customers.data;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (Customer cust &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; x)&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;     {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;         Customer oldCust = nw.Customers.Where(y =&amp;gt; y.CustomerID.Equals(cust.CustomerID)).FirstOrDefault();&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (oldCust == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;         {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum12" style="color:#606060;"&gt;  12:&lt;/span&gt;             nw.Customers.AddObject(cust);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum13" style="color:#606060;"&gt;  13:&lt;/span&gt;         }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum14" style="color:#606060;"&gt;  14:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum15" style="color:#606060;"&gt;  15:&lt;/span&gt;         {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum16" style="color:#606060;"&gt;  16:&lt;/span&gt;             oldCust.Country = cust.Country;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum17" style="color:#606060;"&gt;  17:&lt;/span&gt;             oldCust.City = cust.City;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum18" style="color:#606060;"&gt;  18:&lt;/span&gt;             oldCust.ContactName = cust.ContactName;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum19" style="color:#606060;"&gt;  19:&lt;/span&gt;             oldCust.Address = cust.Address;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum20" style="color:#606060;"&gt;  20:&lt;/span&gt;             oldCust.Phone = cust.Phone;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum21" style="color:#606060;"&gt;  21:&lt;/span&gt;         }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum22" style="color:#606060;"&gt;  22:&lt;/span&gt;     }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum23" style="color:#606060;"&gt;  23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum24" style="color:#606060;"&gt;  24:&lt;/span&gt;     nw.SaveChanges();&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum25" style="color:#606060;"&gt;  25:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum26" style="color:#606060;"&gt;  26:&lt;/span&gt; }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum27" style="color:#606060;"&gt;  27:&lt;/span&gt; &lt;span style="color:#cc6633;"&gt;#endregion&lt;/span&gt; //UpdateCustomers&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Item is a class, used to represent customer in the ViewModel.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; Item(CustomerID, Country, ContactName, CompanyName, City, Address, Phone) {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;             CustomerID: ko.observable(CustomerID),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;             Country: ko.observable(Country),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;             ContactName: ko.observable(ContactName),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;             CompanyName: ko.observable(CompanyName),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;             City: ko.observable(City),                &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;             Address: ko.observable(Address),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;             Phone: ko.observable(Phone)&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;         };&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;     };&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ViewModel&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The ViewModel contains observableArray to present a list with customers. It also has a computed field, named recordsCount, used to display the total number of customers.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; ItemsViewModel() {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; self = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;     self.data = ko.observableArray([]);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;     self.recordsCount = ko.computed(&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; count = 0;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;         count = self.data().length;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; count;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;     });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum12" style="color:#606060;"&gt;  12:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; db.length; i++) {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum13" style="color:#606060;"&gt;  13:&lt;/span&gt;         self.data.push(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Item(db[i].CustomerID, db[i].Country, db[i].ContactName, db[i].CompanyName, db[i].City, db[i].Address, db[i].Phone));&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum14" style="color:#606060;"&gt;  14:&lt;/span&gt;     }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum15" style="color:#606060;"&gt;  15:&lt;/span&gt; };&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data Maintenance:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Load data using the MVC Controller: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You could use jQuery.ajax() to get data as JSON from the Controller. In the sample this approach is used to load data about the customers.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; $.ajax({ url: url, success: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (data) {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;                db = data;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;                itemsModel = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ItemsViewModel();&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;                ko.applyBindings(itemsModel);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;            },&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;                type: &lt;span style="color:#006080;"&gt;&amp;#39;POST&amp;#39;&lt;/span&gt;, dataType: &lt;span style="color:#006080;"&gt;&amp;#39;json&amp;#39;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;            });&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update the data source: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same approach with jQuery.ajax() is used to update the Northwind database. In this case is used action &amp;ldquo;UpdateCustomers&amp;rdquo; in the our MVC controller.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; UpdateCustomers() {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;     $(&lt;span style="color:#006080;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igGrid(&lt;span style="color:#006080;"&gt;&amp;quot;commit&amp;quot;&lt;/span&gt;);  &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;    &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; updatedData = ko.toJSON(itemsModel);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;    $.ajax({&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;        url: updateUrl,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;        type: &lt;span style="color:#006080;"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;        data: updatedData,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;        dataType: &lt;span style="color:#006080;"&gt;&amp;quot;json&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;        contentType: &lt;span style="color:#006080;"&gt;&amp;quot;application/json; charset=utf-8&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;        success: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;            console.log(&lt;span style="color:#006080;"&gt;&amp;#39;Update succeeded!&amp;#39;&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum12" style="color:#606060;"&gt;  12:&lt;/span&gt;        },&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum13" style="color:#606060;"&gt;  13:&lt;/span&gt;        error: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum14" style="color:#606060;"&gt;  14:&lt;/span&gt;            console.log(&lt;span style="color:#006080;"&gt;&amp;#39;Update failed!&amp;#39;&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum15" style="color:#606060;"&gt;  15:&lt;/span&gt;        }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum16" style="color:#606060;"&gt;  16:&lt;/span&gt;    });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum17" style="color:#606060;"&gt;  17:&lt;/span&gt; };&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;JavaScript method &amp;ldquo;UpdateCustomers&amp;rdquo;&amp;nbsp; is called when an update button is clicked.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;position: relative; width: 180px; height: 30px; top: 80px; left: 20px&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;updateBtn&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;height: 30px; width: 180px;&amp;quot;&lt;/span&gt;  &lt;span style="color:#ff0000;"&gt;onclick&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;UpdateCustomers()&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Update Customers&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data Binding and Infragistics jQuery Grid&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You need &amp;ldquo;data-bind&amp;rdquo; clause to create igGrid and bind it to the data source. In this case data source is the option &amp;ldquo;data&amp;rdquo; from our ViewModel.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;table id=&lt;span style="color:#006080;"&gt;&amp;quot;grid&amp;quot;&lt;/span&gt; data-bind=&lt;span style="color:#006080;"&gt;&amp;quot;igGrid: {dataSource: data, width: 1100, height: 500, primaryKey: &amp;#39;CustomerID&amp;#39;, autoCommit: false, &lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;                             features: [ {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;                                 name: &amp;#39;Updating&amp;#39;, editMode: &amp;#39;row&amp;#39;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;                                 }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;                             ],&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;                             autoGenerateColumns: false, &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;                             columns: [&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;                                 {key: &amp;#39;CustomerID&amp;#39;, headerText: &amp;#39;Customer ID&amp;#39;, width: 80, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;                                 {key: &amp;#39;Country&amp;#39;, headerText: &amp;#39;Country&amp;#39;, width: 150, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;                                 {key: &amp;#39;City&amp;#39;, headerText: &amp;#39;City&amp;#39;, width: 100, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;                                 {key: &amp;#39;ContactName&amp;#39;, headerText: &amp;#39;Contact Name&amp;#39;, width: 270, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum12" style="color:#606060;"&gt;  12:&lt;/span&gt;                                 {key: &amp;#39;CompanyName&amp;#39;, headerText: &amp;#39;Company Name&amp;#39;, width: 200, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum13" style="color:#606060;"&gt;  13:&lt;/span&gt;                                 {key: &amp;#39;Address&amp;#39;, headerText: &amp;#39;Address&amp;#39;, width: 200, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum14" style="color:#606060;"&gt;  14:&lt;/span&gt;                                 {key: &amp;#39;Phone&amp;#39;, headerText: &amp;#39;Phone&amp;#39;, width: 100, dataType: &amp;#39;string&amp;#39;}&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum15" style="color:#606060;"&gt;  15:&lt;/span&gt;                             ]&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum16" style="color:#606060;"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum17" style="color:#606060;"&gt;  17:&lt;/span&gt;                          }&amp;quot;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum18" style="color:#606060;"&gt;  18:&lt;/span&gt;         &amp;lt;/table&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Calculated properties: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Calculated property (option) recordsCount is used to represent the total number of customers.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; self.recordsCount = ko.computed(&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; count = 0;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;                     count = self.data().length;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; count;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;                 });&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could bind this property to some HTML element (span in this case).&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;position: relative; width: 180px; height: 30px; top: 20px; left: 20px&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;      &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;label&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;b&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Customers count:&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;b&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;label&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;span&lt;/span&gt;  &lt;span style="color:#ff0000;"&gt;data-bind&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text: recordsCount&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;span&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To gather all in one&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is the whole page with igGird, Knockout and MVVM implementation.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;"&gt;
&lt;div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt; @{&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;     ViewBag.Title = &amp;quot;CustomersNorthwind&amp;quot;;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt; }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt;     $.ig.loader({&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;         scriptPath: &lt;span style="color:#006080;"&gt;&amp;quot;../../Scripts/Infragistics/js/&amp;quot;&lt;/span&gt;, &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;         cssPath: &lt;span style="color:#006080;"&gt;&amp;quot;../../Content/Infragistics/css/&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;         resources: &lt;span style="color:#006080;"&gt;&amp;quot;igGrid.*,extensions/infragistics.datasource.knockoutjs.js,extensions/infragistics.ui.grid.knockout-extensions.js&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;         theme: &lt;span style="color:#006080;"&gt;&amp;quot;metro&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;     });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum1" style="color:#606060;"&gt;   1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum2" style="color:#606060;"&gt;   2:&lt;/span&gt; &amp;lt;script type=&lt;span style="color:#006080;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum3" style="color:#606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; url = &lt;span style="color:#006080;"&gt;&amp;quot;Home/Customers/&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum4" style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; updateUrl = &lt;span style="color:#006080;"&gt;&amp;quot;Home/UpdateCustomers/&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; db, itemsModel;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; Item(CustomerID, Country, ContactName, CompanyName, City, Address, Phone) {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;                 CustomerID: ko.observable(CustomerID),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;                 Country: ko.observable(Country),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum12" style="color:#606060;"&gt;  12:&lt;/span&gt;                 ContactName: ko.observable(ContactName),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum13" style="color:#606060;"&gt;  13:&lt;/span&gt;                 CompanyName: ko.observable(CompanyName),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum14" style="color:#606060;"&gt;  14:&lt;/span&gt;                 City: ko.observable(City),                &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum15" style="color:#606060;"&gt;  15:&lt;/span&gt;                 Address: ko.observable(Address),&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum16" style="color:#606060;"&gt;  16:&lt;/span&gt;                 Phone: ko.observable(Phone)&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum17" style="color:#606060;"&gt;  17:&lt;/span&gt;             };&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum18" style="color:#606060;"&gt;  18:&lt;/span&gt;         };&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum19" style="color:#606060;"&gt;  19:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum20" style="color:#606060;"&gt;  20:&lt;/span&gt;          &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; UpdateCustomers() {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum21" style="color:#606060;"&gt;  21:&lt;/span&gt;              $(&lt;span style="color:#006080;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igGrid(&lt;span style="color:#006080;"&gt;&amp;quot;commit&amp;quot;&lt;/span&gt;);  &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum22" style="color:#606060;"&gt;  22:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; updatedData = ko.toJSON(itemsModel);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum23" style="color:#606060;"&gt;  23:&lt;/span&gt;             $.ajax({&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum24" style="color:#606060;"&gt;  24:&lt;/span&gt;                 url: updateUrl,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum25" style="color:#606060;"&gt;  25:&lt;/span&gt;                 type: &lt;span style="color:#006080;"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum26" style="color:#606060;"&gt;  26:&lt;/span&gt;                 data: updatedData,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum27" style="color:#606060;"&gt;  27:&lt;/span&gt;                 dataType: &lt;span style="color:#006080;"&gt;&amp;quot;json&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum28" style="color:#606060;"&gt;  28:&lt;/span&gt;                 contentType: &lt;span style="color:#006080;"&gt;&amp;quot;application/json; charset=utf-8&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum29" style="color:#606060;"&gt;  29:&lt;/span&gt;                 success: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum30" style="color:#606060;"&gt;  30:&lt;/span&gt;                     console.log(&lt;span style="color:#006080;"&gt;&amp;#39;Update succeeded!&amp;#39;&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum31" style="color:#606060;"&gt;  31:&lt;/span&gt;                 },&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum32" style="color:#606060;"&gt;  32:&lt;/span&gt;                 error: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum33" style="color:#606060;"&gt;  33:&lt;/span&gt;                     console.log(&lt;span style="color:#006080;"&gt;&amp;#39;Update failed!&amp;#39;&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum34" style="color:#606060;"&gt;  34:&lt;/span&gt;                 }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum35" style="color:#606060;"&gt;  35:&lt;/span&gt;             });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum36" style="color:#606060;"&gt;  36:&lt;/span&gt;         };&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum37" style="color:#606060;"&gt;  37:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum38" style="color:#606060;"&gt;  38:&lt;/span&gt;         $.ig.loader(&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum39" style="color:#606060;"&gt;  39:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum40" style="color:#606060;"&gt;  40:&lt;/span&gt;             $.ajax({ url: url, success: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (data) {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum41" style="color:#606060;"&gt;  41:&lt;/span&gt;                 db = data;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum42" style="color:#606060;"&gt;  42:&lt;/span&gt;                 itemsModel = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ItemsViewModel();&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum43" style="color:#606060;"&gt;  43:&lt;/span&gt;                 ko.applyBindings(itemsModel);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum44" style="color:#606060;"&gt;  44:&lt;/span&gt;             },&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum45" style="color:#606060;"&gt;  45:&lt;/span&gt;                 type: &lt;span style="color:#006080;"&gt;&amp;#39;POST&amp;#39;&lt;/span&gt;, dataType: &lt;span style="color:#006080;"&gt;&amp;#39;json&amp;#39;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum46" style="color:#606060;"&gt;  46:&lt;/span&gt;             });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum47" style="color:#606060;"&gt;  47:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; ItemsViewModel() {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum48" style="color:#606060;"&gt;  48:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; self = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum49" style="color:#606060;"&gt;  49:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum50" style="color:#606060;"&gt;  50:&lt;/span&gt;                 self.data = ko.observableArray([]);&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum51" style="color:#606060;"&gt;  51:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum52" style="color:#606060;"&gt;  52:&lt;/span&gt;                 self.recordsCount = ko.computed(&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum53" style="color:#606060;"&gt;  53:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; count = 0;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum54" style="color:#606060;"&gt;  54:&lt;/span&gt;                     count = self.data().length;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum55" style="color:#606060;"&gt;  55:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; count;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum56" style="color:#606060;"&gt;  56:&lt;/span&gt;                 });&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum57" style="color:#606060;"&gt;  57:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum58" style="color:#606060;"&gt;  58:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; i = 0; i &amp;lt; db.length; i++) {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum59" style="color:#606060;"&gt;  59:&lt;/span&gt;                     self.data.push(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Item(db[i].CustomerID, db[i].Country, db[i].ContactName, db[i].CompanyName, db[i].City, db[i].Address, db[i].Phone));&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum60" style="color:#606060;"&gt;  60:&lt;/span&gt;                 }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum61" style="color:#606060;"&gt;  61:&lt;/span&gt;             };&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum62" style="color:#606060;"&gt;  62:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum63" style="color:#606060;"&gt;  63:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum64" style="color:#606060;"&gt;  64:&lt;/span&gt;         });&lt;/pre&gt;
&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum5" style="color:#606060;"&gt;   5:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;h2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Customers Northwind&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;h2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum6" style="color:#606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum7" style="color:#606060;"&gt;   7:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;br&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum8" style="color:#606060;"&gt;   8:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;display: block; height: 600px; width: 1180px;&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum9" style="color:#606060;"&gt;   9:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;float: left; width: 1150px; height: 500px; margin-right: 5px;&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum10" style="color:#606060;"&gt;  10:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;table&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;grid&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;data-bind&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;igGrid: {dataSource: data, width: 1100, height: 500, primaryKey: &amp;#39;CustomerID&amp;#39;, autoCommit: false, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum11" style="color:#606060;"&gt;  11:&lt;/span&gt;                             features: [ {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum12" style="color:#606060;"&gt;  12:&lt;/span&gt;                                 name: &amp;#39;Updating&amp;#39;, editMode: &amp;#39;row&amp;#39;,&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum13" style="color:#606060;"&gt;  13:&lt;/span&gt;                                 }&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum14" style="color:#606060;"&gt;  14:&lt;/span&gt;                             ],&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum15" style="color:#606060;"&gt;  15:&lt;/span&gt;                             autoGenerateColumns: false, &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum16" style="color:#606060;"&gt;  16:&lt;/span&gt;                             columns: [&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum17" style="color:#606060;"&gt;  17:&lt;/span&gt;                                 {key: &amp;#39;CustomerID&amp;#39;, headerText: &amp;#39;Customer ID&amp;#39;, width: 80, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum18" style="color:#606060;"&gt;  18:&lt;/span&gt;                                 {key: &amp;#39;Country&amp;#39;, headerText: &amp;#39;Country&amp;#39;, width: 150, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum19" style="color:#606060;"&gt;  19:&lt;/span&gt;                                 {key: &amp;#39;City&amp;#39;, headerText: &amp;#39;City&amp;#39;, width: 100, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum20" style="color:#606060;"&gt;  20:&lt;/span&gt;                                 {key: &amp;#39;ContactName&amp;#39;, headerText: &amp;#39;Contact Name&amp;#39;, width: 270, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum21" style="color:#606060;"&gt;  21:&lt;/span&gt;                                 {key: &amp;#39;CompanyName&amp;#39;, headerText: &amp;#39;Company Name&amp;#39;, width: 200, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum22" style="color:#606060;"&gt;  22:&lt;/span&gt;                                 {key: &amp;#39;Address&amp;#39;, headerText: &amp;#39;Address&amp;#39;, width: 200, dataType: &amp;#39;string&amp;#39;},&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum23" style="color:#606060;"&gt;  23:&lt;/span&gt;                                 {key: &amp;#39;Phone&amp;#39;, headerText: &amp;#39;Phone&amp;#39;, width: 100, dataType: &amp;#39;string&amp;#39;}&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum24" style="color:#606060;"&gt;  24:&lt;/span&gt;                             ]&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum25" style="color:#606060;"&gt;  25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum26" style="color:#606060;"&gt;  26:&lt;/span&gt;                          }&amp;quot;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum27" style="color:#606060;"&gt;  27:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;table&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum28" style="color:#606060;"&gt;  28:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum29" style="color:#606060;"&gt;  29:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;br&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum30" style="color:#606060;"&gt;  30:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;position: relative; width: 180px; height: 30px; top: 20px; left: 20px&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum31" style="color:#606060;"&gt;  31:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;label&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;b&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Customers count:&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;b&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;label&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;span&lt;/span&gt;  &lt;span style="color:#ff0000;"&gt;data-bind&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text: recordsCount&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;span&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum32" style="color:#606060;"&gt;  32:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum33" style="color:#606060;"&gt;  33:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;position: relative; width: 180px; height: 30px; top: 80px; left: 20px&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum34" style="color:#606060;"&gt;  34:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;updateBtn&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;height: 30px; width: 180px;&amp;quot;&lt;/span&gt;  &lt;span style="color:#ff0000;"&gt;onclick&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;UpdateCustomers()&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Update Customers&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum35" style="color:#606060;"&gt;  35:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum36" style="color:#606060;"&gt;  36:&lt;/span&gt;     &lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span id="lnum37" style="color:#606060;"&gt;  37:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How it works&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is the default data in the Customers table.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_021_5F00_2BAE53D5.png"&gt;&lt;img height="119" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_021_5F00_thumb_5F00_1ED3FDB7.png" alt="KnockoutJSigGridjQuery12.1_02[1]" border="0" title="KnockoutJSigGridjQuery12.1_02[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Start the application:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_011_5F00_28B8EF22.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_011_5F00_thumb_5F00_205519CB.png" alt="KnockoutJSigGridjQuery12.1_01[1]" border="0" title="KnockoutJSigGridjQuery12.1_01[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update records: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Change the address in the first row.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_031_5F00_0D33ED1F.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_031_5F00_thumb_5F00_1DCBE80D.png" alt="KnockoutJSigGridjQuery12.1_03[1]" border="0" title="KnockoutJSigGridjQuery12.1_03[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Updated filed is still not committed.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_03a1_5F00_38980E19.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_03a1_5F00_thumb_5F00_1B42B64F.png" alt="KnockoutJSigGridjQuery12.1_03a[1]" border="0" title="KnockoutJSigGridjQuery12.1_03a[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;When you click &amp;ldquo;Update Customers&amp;rdquo; button data is committed our ViewModel (ItemsViewModel class instance) is updated and data is send as JSON to the Controller using jQuery.ajax()&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_041_5F00_082189A3.png"&gt;&lt;img height="94" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_041_5F00_thumb_5F00_6D74ED89.png" alt="KnockoutJSigGridjQuery12.1_04[1]" border="0" title="KnockoutJSigGridjQuery12.1_04[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Insert records &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You could use the standard &amp;ldquo;Insert row&amp;rdquo; functionality of the igGrid.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_051_5F00_573ED237.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_051_5F00_thumb_5F00_2AB5A251.png" alt="KnockoutJSigGridjQuery12.1_05[1]" border="0" title="KnockoutJSigGridjQuery12.1_05[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Data in the jQuery Grid is updated and you could use the same approach like in update records: commit data and send it to the controller to be possible to save changes in SQL Server.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_05a1_5F00_54B5A079.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_05a1_5F00_thumb_5F00_731FE162.png" alt="KnockoutJSigGridjQuery12.1_05a[1]" border="0" title="KnockoutJSigGridjQuery12.1_05a[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_05b1_5F00_11F65541.png"&gt;&lt;img height="94" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_05b1_5F00_thumb_5F00_7E68F59F.png" alt="KnockoutJSigGridjQuery12.1_05b[1]" border="0" title="KnockoutJSigGridjQuery12.1_05b[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Delete records &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Delete records works in the same way like update and insert.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_061_5F00_3D5A763B.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_061_5F00_thumb_5F00_22ADDA22.png" alt="KnockoutJSigGridjQuery12.1_06[1]" border="0" title="KnockoutJSigGridjQuery12.1_06[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_06a1_5F00_33B20805.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_06a1_5F00_thumb_5F00_0E481497.png" alt="KnockoutJSigGridjQuery12.1_06a[1]" border="0" title="KnockoutJSigGridjQuery12.1_06a[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_06b1_5F00_384812BF.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_06b1_5F00_thumb_5F00_7DEC9CDD.png" alt="KnockoutJSigGridjQuery12.1_06b[1]" border="0" title="KnockoutJSigGridjQuery12.1_06b[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_06c1_5F00_0E8497CC.png"&gt;&lt;img height="170" width="244" src="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/mihail_5F00_mateev/KnockoutJSigGridjQuery12.1_5F00_06c1_5F00_thumb_5F00_7AF7382A.png" alt="KnockoutJSigGridjQuery12.1_06c[1]" border="0" title="KnockoutJSigGridjQuery12.1_06c[1]" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;MVVM implementation with Knockout and igGrid is a pretty easy. You could use Infragistics Hierarchical Grid in similar scenarios when you have hierarchical data. Knockout support in NetAdvantage for jQuery is CTP. Expect in the next releases (after 12.1) more new features for MVVM support.&lt;/p&gt;
&lt;p&gt;Demo application will be available for download after NetAdvantage 2012 Vol.1 RTM release date. &lt;/p&gt;
&lt;p&gt;You can try this product very soon. Follow news from Infragistics in &lt;a href="http://infragistics.com/"&gt;http://infragistics.com/&lt;/a&gt; and twitter: @infragistics for more information about new Infragistics products.&lt;/p&gt;</description></item><item><title>Column Templates for the jQuery Grids</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2012/04/17/column-templates-for-the-jquery-grids.aspx</link><pubDate>Tue, 17 Apr 2012 15:45:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:344979</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;In my last blog I mentioned that our jQuery Grids are getting a new column template option that would also be using our new &lt;a href="http://blogs.infragistics.com/blogs/damyan_petev/archive/2012/04/09/new-high-performance-jquery-templating-engine.aspx" title="High Performance jQuery Templating Engine included in NetAdvantage for jQuery 12.1"&gt;high performance Templating engine&lt;/a&gt; and in this blog will try to expand on both templating and what can you do with it in the grids. And, yes, I keep mentioning grids because this will seamlessly work with both the flat data Grid and the Hierarchical Grid(as it would create instances of the flat grid to build its nested layouts) - you will soon be able to apply templates on every column.&lt;/p&gt;
&lt;p&gt;Now as mentioned before, the Templating Engine functionality is integrated with multiple controls,among which are the grids. That translates in a few benefits &amp;ndash; you get igTemplating scripts the moment you load the grid and the grid internally will call the templating function and provide data and so on. All you have to worry about is providing the template string. So the way templates work with the controls remains pretty much the same and you might not feel the change at all. When you do, though, you can start use the new column template functionality &amp;ndash; similar to the existing row template, but rather than making a template for all the columns in the row, you can now create a template for just that one column you are interested in! That should be a step forward in terms of flexibility and getting what you need done fast. &lt;/p&gt;
&lt;h1&gt;Just a few steps&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Adding in scripts&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that is yet another subject we&amp;rsquo;ve been sharing bits here and there &amp;ndash; for 12.1 we have a loader control that is there to handle scripts and styles for you (you can check out this blog post on &lt;a href="http://blogs.infragistics.com/blogs/atanas_dyulgerov/archive/2012/04/11/using-the-infragistics-loader-to-manage-resource-references.aspx" title="Using the Infragistics jQuery Loader to manage resources"&gt;using the jQuery Loader to manage resources&lt;/a&gt;). The best part is that it follows the dependencies of the control you need and loads them too. That should explain why this:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3d905a90-068b-41be-b9e8-490d3dea54cb" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;$.ig.loader({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scriptPath: &lt;span style="color:#800000;"&gt;&amp;quot;../../Scripts/js/&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cssPath: &lt;span style="color:#800000;"&gt;&amp;quot;../../Content/css/&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resources: &lt;span style="color:#800000;"&gt;&amp;quot;igGrid.Paging&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;would result in loading those files:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Grids_Column_Template/Scripts.png" alt="Infragistics jQuery Loader managing dependencies - Templating as integral part of the grids" title="Infragistics jQuery Loader managing dependencies - Templating as integral part of the grids" /&gt;&lt;/p&gt;
&lt;p&gt;Notice the templating in there? Of course the same result would be observed if you use Hierarchical Grid instead or the ASP.NET MVC wrapper:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:eb6b1c51-6246-4fa1-a4ed-82eee3da8c2d" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;&lt;span style="background:#ffff00;"&gt;@(&lt;/span&gt; Html.Infragistics().Loader()&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.CssPath(&lt;span style="color:#a31515;"&gt;&amp;quot;../../Content/css/&amp;quot;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ScriptPath(&lt;span style="color:#a31515;"&gt;&amp;quot;../../Scripts/js/&amp;quot;&lt;/span&gt;)&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.Render()&lt;span style="background:#ffff00;"&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background:#ffff00;"&gt;@(&lt;/span&gt; Html.Infragistics()&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.Grid(Model) &lt;span style="color:#008000;"&gt;//continues...&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Template strings&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As mentioned above, functionality remains the same &amp;ndash; the grid will handle templating internally and you provide the sting only. For this example let&amp;rsquo;s assume you are to display Customers (and optionally Orders) from the Northwind database and you already have a controller action exposing it. That means that in your templates you can use the data fields by name (just keep in mind it is case sensitive). Templates can be provided within or separately from the grid definition if you want to keep it neat. Let&amp;rsquo;s turn the &amp;lsquo;Country&amp;rsquo; field into a flag rather than simple text:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:42458e54-7278-42cf-a2f7-4766c73ca360" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#fff;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; CountryTemplate = &lt;span style="color:#800000;"&gt;&amp;quot;&amp;lt;img alt=\&amp;quot;${Country}\&amp;quot; src=\&amp;quot;http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_${Country}.svg/167px-Flag_of_${Country}.svg.png\&amp;quot; &amp;gt;&amp;lt;/img&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A simple &amp;lt;img&amp;gt; tag would do the trick and the source images are actually the thumbnails from Wikimedia&amp;rsquo;s &lt;a href="http://commons.wikimedia.org/wiki/Sovereign-state_flags" title="Sovereign-state flags page - Wikimedia Commons"&gt;Sovereign-state flags page&lt;/a&gt;. While this would work for most, there are some exceptions (like UK and USA as seen in Northwind, rather than the full name used for the images) and the results are not quite there yet:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Grids_Column_Template/CountryTemplate.png" alt="Infragistics jQuery Grid with image Column Template" title="Infragistics jQuery Grid with image Column Template" /&gt;&lt;/p&gt;
&lt;p&gt;To improve on that we would use some conditional blocks to make our template flexible. The engine provides support for logic like the following:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;{{if &amp;lt;condition1&amp;gt;}} &amp;lt;template1&amp;gt; {{elseif &amp;lt;condition2&amp;gt;}} &amp;lt;template2&amp;gt; {{else}} &amp;lt;default template&amp;gt; {{/if}}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And here&amp;rsquo;s the full template once we apply that:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a9d9b2a3-378c-47d6-aee2-a4e1a4bebeab" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:100px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; CountryTemplate = &lt;span style="color:#800000;"&gt;&amp;quot;{{if ${Country} == \&amp;#39;UK\&amp;#39;}} &amp;lt;img alt=\&amp;quot;${Country}\&amp;quot; src=\&amp;quot;http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Flag_of_the_United_Kingdom.svg/200px-Flag_of_the_United_Kingdom.svg.png\&amp;quot;&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;+ &lt;span style="color:#800000;"&gt;&amp;quot;{{elseif ${Country} == \&amp;#39;USA\&amp;#39;}} &amp;lt;img alt=\&amp;quot;${Country}\&amp;quot; src=\&amp;quot;http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Flag_of_the_United_States.svg/190px-Flag_of_the_United_States.svg.png\&amp;quot; &amp;gt;&amp;lt;/img&amp;gt;&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;+ &lt;span style="color:#800000;"&gt;&amp;quot;{{else}} &amp;lt;img alt=\&amp;quot;${Country}\&amp;quot; src=\&amp;quot;http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_${Country}.svg/167px-Flag_of_${Country}.svg.png\&amp;quot; &amp;gt;&amp;lt;/img&amp;gt; {{/if}}&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And while still on the subject of conditional templates let&amp;rsquo;s do little trick for the column showing the customer ID. For the sake of the example lets have a special treatment for countries begging with &amp;lsquo;U&amp;rsquo;. How would we do that? The trick is that when you use conditional blocks, what is inside that block will be compiled as JavaScript code, unlike simple substitution that will only produce a string for a performance boost. That means you can call various functions and use JavaScript logic there:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0c4c0821-728e-4a36-b614-472ac1f6f6b0" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#fff;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; CustomerTemplate = &lt;span style="color:#800000;"&gt;&amp;#39;# Invisible comment text # {{if ${Country}.lastIndexOf(&amp;quot;U&amp;quot;, 0) === 0 }}&amp;lt;p style=\&amp;#39;color:rgb(0, 175, 235);\&amp;#39;&amp;gt;Conpany: ${CompanyName} &amp;lt;p&amp;gt; {{else}}Customer ID: ${CustomerID} {{/if}}&amp;#39;&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note the usage of &amp;lsquo;lastIndexOf&amp;rsquo; method, which would compare the index of the last discovered &amp;lsquo;U&amp;rsquo; char while checking only the first position in the country and in the same way this can be a custom function to perform more complicated checks. Results from the above improvements look like so:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Grids_Column_Template/CountryTemplate_ImprovedConditional.png" alt="Infragistics jQuery Grid with conditional and multi-conditional Column Templates" title="Infragistics jQuery Grid with conditional and multi-conditional Column Templates" /&gt;&lt;/p&gt;
&lt;p&gt;Note the middle row displays the company name instead the the ID and the flag is now with proper source.&lt;/p&gt;
&lt;p&gt;Besides complicated conditional logic you can also use &amp;lsquo;each&amp;rsquo; block to produce the kind of template you need. Examples for that would be creating HTML list to be transformed into a tree control or select element. In both cases the loop would be required to go through all the internal items:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:843ed8bb-61a4-4b03-afc6-07821ab0d2e4" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#fff;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; OrdersTemplate = &lt;span style="color:#800000;"&gt;&amp;quot;&amp;lt;select id=\&amp;quot;IdSelect\&amp;quot;&amp;gt;{{each ${Orders} }}&amp;nbsp;&amp;nbsp;&amp;lt;option&amp;gt;${Orders.OrderID}&amp;lt;/option&amp;gt;&amp;nbsp;&amp;nbsp;{{/each}}&amp;lt;/select&amp;gt;&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The default select will contain all the OrderID-s for the current record. You can drill down the hierarchy even though some of those fields might not be included in the layout(but are in the data) and you can assign various attributes to your template markup which can then be used as targets for scripts and styles. Using that technique can provide great versatility in regards to what kind of content you have in your grid (turning numbers into ratings, taking child data to create a chart, etc. ).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Setting up the grid&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What is left is to add a grid to your page (flat data or a hierarchical) and use the new &amp;lsquo;template&amp;rsquo; property available for column options (of course you can apply templates to the child layouts). In the definition you will see the templates defined above assigned to columns, a template applied to the child layout inline and the dataRendered event used to transform the select elements into igCombo controls:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:39cbd604-ca6d-48ab-85f2-566094627deb" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:200px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;$(&lt;span style="color:#800000;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igHierarchicalGrid({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;span style="color:#800000;"&gt;&amp;quot;400px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;650px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateLayouts: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;initialDataBindDepth: 1,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;defaultChildrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataSource: &lt;span style="color:#800000;"&gt;&amp;quot;/Home/CustomersAndOrders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Customer ID&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;}&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt;, template: CountryTemplate },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;EntityState&amp;quot;&lt;/span&gt;, template: OrdersTemplate} &lt;span style="color:#006400;"&gt;//this column is just used to host the selects&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columnLayouts: [{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;key: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;childrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateLayouts: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;OrderID&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Order ID&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;OrderID&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;number&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Freight&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Freight&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;number&amp;quot;&lt;/span&gt;, template: &lt;span style="color:#800000;"&gt;&amp;quot;Freight: &amp;lt;b&amp;gt;${Freight}&amp;lt;/b&amp;gt;&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Shipped Date&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;ShippedDate&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;date&amp;quot;&lt;/span&gt; }&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;GroupBy&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tyoe: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Paging&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageSize: 10,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;showPageSizeDropDown: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Sorting&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataRendered: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (evt, ui) {&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style="color:#800000;"&gt;&amp;quot;select[id~=\&amp;quot;IdSelect\&amp;quot;]&amp;quot;&lt;/span&gt;).igCombo({&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;100px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;selectionChanged: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (evt, ui) {&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ui.owner.element.parent().append(&lt;span style="color:#800000;"&gt;&amp;quot;Selected: &amp;quot;&lt;/span&gt; + ui.items[0].text);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//clear selections&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style="color:#800000;"&gt;&amp;quot;select[id~=\&amp;quot;IdSelect\&amp;quot;]&amp;quot;&lt;/span&gt;).igCombo(&lt;span style="color:#800000;"&gt;&amp;quot;selectedIndex&amp;quot;&lt;/span&gt;, -1);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;While the logic provided to handle the selection changed on the combo is rather simplistic, it is there to mark the possibility. And the resulting grid from the definition above combined with the templates looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Grids_Column_Template/Hierarchical_Grid_Templates_Combo.png" alt="Infragistics jQuery Hierarchical Grid with multi-conditional Column Templates, templated combo control and child layout column." title="Infragistics jQuery Hierarchical Grid with multi-conditional Column Templates, templated combo control and child layout column." /&gt;&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The Templating Engine provides plenty of functionality and now with column templates you can apply that just where it&amp;rsquo;s needed with familiar experience. While the snippet above uses a hierarchical grid, it is just to show it is possible to template the child layouts and the flat data grid would be templated in very much the same manner. You&amp;rsquo;ve seen some ideas on how you can make use of such features, but really what you can do with that is down to your needs and creativity!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update: Download &lt;strong&gt;&lt;a href="http://media.infragistics.com/community/Release/12.1/jQuery/Grids_Column_Template/Column_Templates_Demo.zip" title="The demo project."&gt;the demo project&lt;/a&gt;&lt;/strong&gt; - an ASP.NET MVC application used as base, with two views - one where the grid is defined using the helper and one with nothing but pure script. Keep in mind you will need at least a Trial version of our&lt;a target="_blank" href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Overview" title="jQuery Controls, brilliant Data Visualization and jaw-dropping performance - part of Infragistics&amp;#39; NetAdvantage product family."&gt; jQuery controls&lt;/a&gt; (it&amp;#39;s free!).&lt;/em&gt;&lt;/p&gt;</description></item><item><title>What is Continuous Virtualization in the jQuery Grids?</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2012/04/04/what-is-continuous-virtualization-in-the-jquery-grids.aspx</link><pubDate>Wed, 04 Apr 2012 15:35:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:342688</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;Get the lowdown on the virtualization that never stops, so to speak&amp;hellip; Soon enough the countdown to 12.1 will be over and what you will find named as Continuous Virtualization is an awesome new feature. It is designed specifically for hierarchical data &amp;ndash; therefore finds it&amp;rsquo;s place as feature for our powerful jQuery Grids, more specifically providing virtualization for hierarchical and grouped layouts. We are looking forward to share all the new goodness that is ahead and we want you to be as excited about them as we are! So, to give you a sneak peak, lets talk virtualization. Of course, you would need some basics on the virtualization process the grids offer currently.&lt;/p&gt;
&lt;h1&gt;Virtual you say?&lt;/h1&gt;
&lt;p&gt;When performance is your goal, virtualization is pretty much your best friend. It is an unique feature of the client jQuery grid and it can greatly speed up not just the initial loading but the overall processes on the client. The idea is really simple on paper, much harder to do right and most importantly highly effective &amp;ndash; you can have a million records in the data, but there&amp;rsquo;s no point to create UI elements for them all when the UI can only show a tiny(in comparison) amount. So instead the grid will only create pre-defined number of rows and use them to display the visible data. That in essence means two simple things &amp;ndash; the footprint of that huge data will be actually really small and it would be about the same for various sizes of records and therefore the memory required, the load on the client (CPU usage) for the &lt;strong&gt;&lt;em&gt;UI&lt;/em&gt;&lt;/strong&gt; will not only be low, but should also remain almost the same with smaller and larger sets of data. &lt;/p&gt;
&lt;p&gt;So, you might wonder, what happens when you do want to see those rows that have not been included? Here is where the virtualization really shines &amp;ndash; among other possible routes of implementing it, we chose to keep that pool of rows completely static. That means the grid will not just use them &amp;ndash; it will &lt;strong&gt;&lt;em&gt;reuse&lt;/em&gt;&lt;/strong&gt; them. Which means that those actual UI elements are not going anywhere. As the user scroll down the grid will instead replace data in the rows rather than deleting them and making new ones (which once more saves time and consumption). The rows also stay static in the DOM which is yet another benefit, as moving items in the DOM is also relatively slow process.&lt;/p&gt;
&lt;p&gt;While all this is wonderful, there are some limitations currently &amp;ndash; this virtualization cannot work with rows that have variable height or such that are being moved or expanded. That is essence excludes the Hierarchical Grid and the layout created by the Group By feature.&lt;/p&gt;
&lt;h1&gt;Filling the gaps&lt;/h1&gt;
&lt;p&gt;The Continuous Virtualization comes to make up for the shortfalls of the otherwise brilliantly working with flat data virtualization. Again it uses a predefined number of rows and as the user scrolls it will determine if the available rows are enough to display the ones in view are react accordingly, which again ends up with significantly reduced overhead in the DOM as just a small portion of rows, compared to the data, will exist there. There&amp;rsquo;s more &amp;ndash; to accommodate variable row heights, after a scroll takes place the grid needs to calculate which rows should be displayed and it does that by calculating an average for the height &amp;ndash; which makes the AvgRowHeight, that is pretty much required by the fixed virtualization, a thing of the past. Calculation is based of the actual rows the grid has available (the ones that are/were visible and created) and it is logically only an approximation rather than the true average value. That can cause same issues like incorrect scroller position and to prevent that the grid is smart enough and will adjust that positing on the fly, if such event occurs. Of course, the pool of rows will serve as a buffer for options such as a row being expanded, but if the scrolling process &amp;lsquo;pushes&amp;rsquo; it&amp;nbsp;out, that row will be set back to it&amp;rsquo;s default.&lt;/p&gt;
&lt;p&gt;So besides&amp;nbsp; the fact that it completes the functionality of the grids, why is it continuous? The point it that it doesn&amp;rsquo;t virtualize a pre-defined on load layout, but rather dynamic layouts that don&amp;rsquo;t exist quite yet &amp;ndash; like a child of an expanded row and expandable new parent-rows as a result of grouping. It&amp;rsquo;s a process that just keeps ticking &amp;ndash; constantly ready to provide virtualization and constantly re-calculating row heights and adjusting the scrollbar to provide you that seamless scrolling experience with hierarchical data of impressive sizes.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s jump into an actual example and grab the all-time-favourite Nothwind and lets have our Customers information from there displayed neatly on the client by our NetAdvantage for jQuery Grid and since we are at it lets enable its GroupBy feature so we can have a look at our customers from each country for example. To take benefits from the new virtualization option we need to do some settings:&lt;/p&gt;
&lt;p&gt;-First and foremost &amp;ndash; enable virtualization&lt;/p&gt;
&lt;p&gt;- Set the virtualization mode to continuous&lt;/p&gt;
&lt;p&gt;- Define width and height for the grid &amp;ndash; This is required for virtualization.&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:52eeb97e-8dc2-4fa8-aaae-bf9fd01e9f42" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:200px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;$(&lt;span style="color:#800000;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igGrid({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// required for virtualization&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;span style="color:#800000;"&gt;&amp;quot;300px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;700px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// enable virtualization&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;virtualization: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// -- &lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//&amp;nbsp;&amp;nbsp;set to continuous&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;virtualizationMode: &lt;span style="color:#800000;"&gt;&amp;quot;continuous&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// --&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataSource: &lt;span style="color:#800000;"&gt;&amp;quot;/Home/Customers&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;GroupBy&amp;quot;&lt;/span&gt; }]&lt;/li&gt;
&lt;li&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="width:646px;overflow:hidden;"&gt;
&lt;p&gt;That code essentially combined with a server-side JSON-returning action makes for an extremely fast and easy delivered app with a client grid that supports grouping and you can pretty much do this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Continuous_Virtualization/GroupBy_virtualization_igGrid.png" alt="igGrid with Group By Continuous Virtualization" title="igGrid with Group By Continuous Virtualization" /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you look at the generated markup you get 54 rows :&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Continuous_Virtualization/GroupBy_markup.png" alt="igGrid with Group By Continuous Virtualization - produced markup" title="igGrid with Group By Continuous Virtualization - produced markup" /&gt;&lt;/p&gt;
&lt;p&gt;Since the Northwind customers are only 90-something number like that isn&amp;rsquo;t all that impressive and frankly you can go without virtualization as whole. Then again those rows also contain the group header rows that are not really part of the data, but rather added by the GroupBy feature and still they are visible, thus they are in the markup. Still say you have a few of them in those fifty rows in the DOM &amp;ndash; that&amp;rsquo;s still probably over one third of the actual data in there?&lt;/p&gt;
&lt;p&gt;BUT.. things get drastically better when you go for the big data. No matter how much - from 500 to 10000 -&amp;nbsp; when you look at the markup you will see this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Continuous_Virtualization/GroupBy_markup_10000records.png" alt="igGrid with Group By Continuous Virtualization - produced markup with 10000 rows" title="igGrid with Group By Continuous Virtualization - produced markup with 10000 rows" /&gt;&lt;/p&gt;
&lt;p&gt;Surprised? I hope not &amp;ndash; that was the whole point of virtualizing the UI elements in the DOM! You get a &lt;strong&gt;&lt;em&gt;constant number of generated actual rows,&lt;/em&gt;&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;unaffected by the size of your data.&lt;/em&gt;&lt;/strong&gt; And what happens when you scroll to the bottom of a 10 000 &amp;lsquo;rows&amp;rsquo;? Do all the stuff you scroll through get added to those in the DOM? Of course not! Look:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/12.1/jQuery/Continuous_Virtualization/GroupBy_markup_10000records_scrolled.png" alt="igGrid with Group By Continuous Virtualization - produced markup, 10000 rows after scrolling" title="igGrid with Group By Continuous Virtualization - produced markup, 10000 rows after scrolling" /&gt;&lt;/p&gt;
&lt;p&gt;Note that while the IDs of the rows are now in the 8000 range, but if you look closely: 8541 minus 8489 is.. well what a surprise &amp;ndash; 52(or 53 rows)! The row count stays the same as it not affected by the position or the number of rows that have been displayed already &amp;ndash; just like it is explained &amp;ndash; the grid will simply keep a constant pool of reusable rows and it is not based on the data, as records come and go for those rows &amp;ndash; it is actually based on the height of the layout!&lt;/p&gt;
&lt;h1&gt;With even more&amp;nbsp;hierarchy&lt;/h1&gt;
&lt;p&gt;Now when you want a hierarchical grid this new virtualization does not only allow for the expandable rows to be virtualized. It does not only allow for them to have variable height and it does not only function with Group By. Continuous virtualization can be set for child layouts. Here&amp;rsquo;s a sample grid definition, this time using both the Customers and their orders:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6403bf04-0a4c-4458-8e60-df28c63354c0" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:200px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;$(&lt;span style="color:#800000;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igHierarchicalGrid({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// required for virtualization&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;span style="color:#800000;"&gt;&amp;quot;300px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;700px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// enable virtualization&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;virtualization: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// -- &lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//&amp;nbsp;&amp;nbsp;set to continuous&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;virtualizationMode: &lt;span style="color:#800000;"&gt;&amp;quot;continuous&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// --&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateLayouts: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;initialDataBindDepth: 1,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;defaultChildrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataSource: &lt;span style="color:#800000;"&gt;&amp;quot;/Home/CustomersAndOrders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Customer ID&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt; }, &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Company Name&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;CompanyName&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt; }, &lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt; }, &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt; }&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columnLayouts: [{&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;key: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;childrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateLayouts: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;OrderID&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// ## BEGIN&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// enable virtualization&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;virtualization: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// -- &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//&amp;nbsp;&amp;nbsp;set to continuous&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;virtualizationMode: &lt;span style="color:#800000;"&gt;&amp;quot;continuous&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;// ## END&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;300px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;span style="color:#800000;"&gt;&amp;quot;50px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Order ID&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;OrderID&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;number&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Freight&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Freight&amp;quot;&lt;/span&gt;, dataType: &lt;span style="color:#800000;"&gt;&amp;quot;number&amp;quot;&lt;/span&gt; }&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;GroupBy&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tyoe: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}],&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;GroupBy&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Sorting&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type: &lt;span style="color:#800000;"&gt;&amp;quot;local&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;});&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This allows for each grid instance to have it&amp;#39;s own virtualization - parent, child or child&amp;nbsp;that has&amp;nbsp;its own hierarchy and so on.&lt;/p&gt;
&lt;p&gt;You might notice there&amp;rsquo;s a height of 50 defined for the child layout (as with the parent, that is required for virtualization) &amp;ndash; that is because the number of orders just isn&amp;rsquo;t enough and since the pool of rows is based on height&amp;nbsp;I had to squish it a little to force the process. Than again that is just an example (expect better ones soon) and just because of that if we take the customer with ID BONAP with just 17 orders (the most a quick look managed). When you expand that row the child layout&amp;rsquo;s markup will consist of just 10 rows. If the height is about 100 the rows would be about 20 regardless if you have 100 or 1000 records in there or they have child records themselves &amp;ndash; and that&amp;rsquo;s, simply put, overhead reduction!&lt;/p&gt;
&lt;h1&gt;The advantage you get&lt;/h1&gt;
&lt;p&gt;No matter the size, whether it&amp;rsquo;s 100 or 10 000, the DOM structure on the client side will remain stable and most importantly low. Now imagine that was not available, imagine hierarchical structure of 10 000 rows with 100 more children each&amp;hellip; that&amp;rsquo;s 10 000 TR elements alone and then imagine the cells in them - a certain recipe for disaster! And believe me, I do mean it &amp;ndash; a sample with generated just as much data I tried&amp;nbsp; basically made attempt to crash my browsers and while they managed &amp;ndash; the performance was unimpressive &amp;ndash; expanding a row (additional 100 rows) and initial loading took some time. So whenever you can&amp;rsquo;t rely on loading data on demand (or that data is so much that each piece if that kind of size) you can enable the Continuous virtualization feature and enjoy instant loading and expanding and fluid interaction with huge data. This feature does not only reduce the memory load and CPU consumption, it actually makes such high numbers feasible option.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s no small thing to be looking for &amp;ndash; as soon as the new release is a fact I will add a demo project to this for you to download. Last but not least, expect more great additions &amp;ndash; so keep eye on the community site, follows &lt;a href="https://twitter.com/#!/infragistics" title="Infragistics on Twitter"&gt;@Infragistics&lt;/a&gt;, give a like on &lt;a href="http://www.facebook.com/infragistics" title="Infragistics on Facebook"&gt;Facebook&lt;/a&gt; and we will do our best to keep you informed, prepare you for the new stuff and hopefully have you thrilled about it!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: &lt;/em&gt;&lt;a href="http://media.infragistics.com/community/Release/12.1/jQuery/Continuous_Virtualization/ContinuousVirtualizationDemo.zip" title="Demo project"&gt;&lt;em&gt;Demo project&lt;/em&gt;&lt;/a&gt;&lt;em&gt; available for download! Including both flat data grid virtualization in combination with grouping, as well as hierarchical grid implementation.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Combining different data sources in jQuery: Fun with the Infragistics Mashup Data Source</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2012/03/08/combining-different-data-sources-in-jquery-fun-with-the-infragistics-mashup-data-source.aspx</link><pubDate>Thu, 08 Mar 2012 15:10:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:337077</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;Reading our blogs often makes it almost guaranteed that you have seen us mention our jQuery data source here and there or even spot it in code snippets. And while it appears alongside other controls on regular basis, its presence is actually much more impactful than what you may expect from a non-visual component. It&amp;rsquo;s one of those working their magic behind the scenes type &amp;ndash; and that&amp;rsquo;s not in odd places, but basically with every data-bound control. The &lt;a target="_blank" href="http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=igDataSource_igDataSource_Overview.html" title="igDataScource Overview in the Online Help Topics"&gt;igDataScource&lt;/a&gt; is in fact the force that feeds data to almost every control in the NetAdvantage for JQuery family. You&amp;rsquo;d wonder then why the shy-of-attention attitude then? Well, it&amp;rsquo;s simple &amp;ndash; it&amp;rsquo;s meant to shine while being barely noticeable and saving you all the effort that accessing and transforming data from various sources can take. The component allows for multiple types of data and origin &amp;ndash; a range of web services and local data or even when all else fails - the option to feed your data through data-returning function. You will also find quite a few classes that extend it to provide some predefined setting for greater ease of use in the most common cases. Since we put the focus on that it&amp;rsquo;s probably time to mention that with the latest release the numbers of supported scenarios by multiple implementations got bolstered a bit more, both of them really, with a CPT (Community Technology Preview) of a very interesting &amp;lsquo;type&amp;rsquo; of data source &amp;ndash; the Mashup Data Source. &lt;/p&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Now this would be somewhat off-topic, but&amp;nbsp; the spellchecker insists this is misspelled and I tend to disagree based on this &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)" title="Mashup article on Wikipedia"&gt;article about Mashup on Wikipedia&lt;/a&gt;. And to get back on topic, on that page you can read that the term Mashup can refer to a web page/application &amp;ldquo;that uses and combines data,[..]&amp;rdquo; -&amp;nbsp; I am cutting this quote off here. I believe that is more than enough to give you a decent hint what would a component, that serves as middle layer between data and data-bound controls, would do if it has &amp;lsquo;mashup&amp;rsquo; in its name. Pretty straightforward&amp;nbsp; - the igMashupDataSource is an extension of the base igDataScource and it allows you to combine entries from different sources into one. And since I believe this fits so well I&amp;rsquo;ll also add that the goal is &amp;ldquo;to produce enriched results that were not necessarily the original reason for producing the raw source data.&amp;rdquo; - and I find that thought very pleasing and that is exactly how it should be &amp;ndash; this component is not just useful, but also a purveyor of satisfaction and fun &amp;ndash; thus, the title above. And this should happen fast and easy and seamless - you still get all the familiar functionality inherited from base class or can also add to already available settings in case you have a running project. &lt;/p&gt;
&lt;p&gt;Of course there&amp;rsquo;s a very minor catch, if you can even call it that &amp;ndash; it&amp;rsquo;s not as simple as pointing to two sources and wait for them to be combined. For that to happen you will have to provide a common key. So while not meant to be combined, still not that random data after all? Well, depends on the case and how look at it &amp;ndash; data can be coming from sources that know nothing of each other, yet share keys or you can tweak one to fit or one or all of the sources can be your own &amp;ndash; either way you get a single collection consumable by a single control and you get plenty of freedom &amp;ndash; I&amp;rsquo;d put a &amp;ldquo;fun&amp;rdquo; label on that, too. Let&amp;rsquo;s say you have data that is publicly available and therefore you&amp;rsquo;d imagine it&amp;rsquo;s two things &amp;ndash; probably read-only and while it can be rich, it might still be missing something you need and there&amp;rsquo;s nothing you can do about that. Or can you? That&amp;rsquo;s exactly it &amp;ndash; you can combine two compatible public sources or enrich what is available with data of your own &lt;strong&gt;and&lt;/strong&gt; those can be with not only different origin, but also with different type.&lt;/p&gt;
&lt;p&gt;Note: I&amp;rsquo;d like to stress one more time this is still a CTP component and therefore it is very possible that it may not function fully and / or some things might be very different in the final version of it.&lt;/p&gt;
&lt;h1&gt;Getting started&lt;/h1&gt;
&lt;p&gt;As mentioned before the component is an extension of the base data source class and it should come as no surprise that using it feels very familiar and not that much different. The only additional things you will see is a data source property outside the inherited one and a property indicating whether records that have no data in all sources ( therefore they are partial) should be ignored. The latter is mean to let you get just the final results you want &amp;ndash; whether it&amp;rsquo;s all of records or just a &amp;lsquo;section&amp;rsquo; of only those that exist in all sources. The data source is what I&amp;rsquo;d describe as the &amp;lsquo;master&amp;rsquo; one and it takes an array of data sources itself and this is where your data from different origins comes together. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Preparations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before that there are as always some preparations &amp;ndash; adding the required resources and some setup to use the assorted data. Starting off with some resources which this time can be as diverse as you scenario requires &amp;ndash; since it is a non-visual component that is built as a JavaScript class it doesn&amp;rsquo;t rely on jQuery UI scripts and therefore you can only reference the default jQuery&amp;nbsp; library and the &amp;lsquo;ig.util.js&amp;rsquo; where the component is. And even though you can do that and use the Mashup Data Source for anything you see fit, it&amp;rsquo;s only in rare occasions when you wouldn&amp;rsquo;t want to present it nicely too. And again how to do that comes with enough freedom(including displaying it in a table using templating as seen in our &lt;a target="_blank" href="http://samples.infragistics.com/jquery/data-source/mashup-data-source" title="NetAdvantage for jQuery online samples - Mashup data source"&gt;NetAdvantage for jQuery online samples&lt;/a&gt; ), so for this example I will use our jQuery Hierarchical grid. For that reason below in snippets and in the demo project you will see both jQuery and jQuery UI libraries, along with the full Infragistics UI scripts file.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s define two sources for our main data layout &amp;ndash; one being a small sample from the &lt;a target="_blank" href="http://developer.netflix.com/docs/oData_Catalog"&gt;Netflix OData catalog&lt;/a&gt; and the other one being our very own xml file &amp;ndash; the basic idea behind this is to take such online data and add your personal notes to it. We would need to define origin and schema to apply on those:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c788c70f-2bec-4a9c-a1fb-34b780252d27" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;&lt;span style="color:#006400;"&gt;&amp;lt;!--CSS --&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;link&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;href&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;../../Content/themes/min/ig/jquery.ui.custom.min.css&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;rel&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/css&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;link&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;href&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;../../Content/themes/base/ig.ui.min.css&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;rel&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/css&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#006400;"&gt;&amp;lt;!-- Scripts --&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;../../Scripts/jquery-1.5.1.min.js&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;../../Scripts/jquery-ui-1.8.11.min.js&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;src&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;../../Scripts/ig.ui.min.js&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; url, oDataSchema, xmlDoc, xmlSchema,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mashupSources, dsMashup;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url = &lt;span style="color:#800000;"&gt;&amp;quot;http://odata.netflix.com/Catalog/Titles?$format=json&amp;amp;$callback=?&amp;amp;$top=10&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oDataSchema = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; $.ig.DataSchema(&lt;span style="color:#800000;"&gt;&amp;quot;json&amp;quot;&lt;/span&gt;, { fields: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;BoxArt&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;AverageRating&amp;quot;}&lt;/span&gt;],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;searchField: &lt;span style="color:#800000;"&gt;&amp;quot;d&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlDoc = loadXMLDoc(&lt;span style="color:#800000;"&gt;&amp;quot;/Content/MovieNotes.xml&amp;quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlSchema = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; $.ig.DataSchema(&lt;span style="color:#800000;"&gt;&amp;quot;xml&amp;quot;&lt;/span&gt;, {&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fields: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;, xpath: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ name: &lt;span style="color:#800000;"&gt;&amp;quot;Notes&amp;quot;&lt;/span&gt;, xpath: &lt;span style="color:#800000;"&gt;&amp;quot;Notes&amp;quot;&lt;/span&gt; }&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;searchField: &lt;span style="color:#800000;"&gt;&amp;quot;//Movie&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; loadXMLDoc(dname) {&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (window.XMLHttpRequest) {&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xhttp = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; XMLHttpRequest();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xhttp = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ActiveXObject(&lt;span style="color:#800000;"&gt;&amp;quot;Microsoft.XMLHTTP&amp;quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xhttp.open(&lt;span style="color:#800000;"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;, dname, &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xhttp.send();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; xhttp.responseText;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//continues...&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Of course for the XML file you can use &lt;a target="_blank" href="http://api.jquery.com/jQuery.get/" title="jQuery get()"&gt;jQuery&amp;rsquo;s get()&lt;/a&gt; (short for $.ajax) to perform the HTTP GET request, too. Or that xml can come from just about anywhere as long as it is presented in a form the igDataSource accepts. Defining the schemas provides the way to navigate the responses&amp;rsquo; structure and which fields to be taken. As for the contents of the xml file it&amp;rsquo;s basically movies with ID and Notes nodes and you will find it in the demo project.&lt;/p&gt;
&lt;p&gt;Then for a good measure I have an ASP.NET MVC action that returns JSON from a randomly generated values (again IDs and each having a collection of generated Fans with random initial and rating). The idea is that we would not only add a third source, but also it will be the sole provider for data of the child layouts in the hierarchical grid:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ac5e5de0-c9d1-4b62-b783-d26f08bca66f" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;[&lt;span style="color:#2b91af;"&gt;ActionName&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;getData&amp;quot;&lt;/span&gt;)]&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;JsonResult&lt;/span&gt; JsonSource()&lt;/li&gt;
&lt;li&gt;{ &lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; mmData = &lt;span style="color:#2b91af;"&gt;MoreMovieData&lt;/span&gt;.Generate();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; Json(mmData, &lt;span style="color:#2b91af;"&gt;JsonRequestBehavior&lt;/span&gt;.AllowGet);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note: If you do decide to go with this make sure to check out &lt;a target="_blank" href="http://forums.asp.net/t/1483387.aspx" title="Topic on the ASP.NET forums"&gt;this topic on the ASP.NET forums&lt;/a&gt; for why we have JsonRequestBehavior.AllowGet in there and this &lt;a target="_blank" href="http://haacked.com/archive/2009/06/25/json-hijacking.aspx" title="JSON Hijacking blog by Phil Haack"&gt;blog by Phil Haack&lt;/a&gt; on the subject.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;All for one&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that we have three sources ready it is time to create our Mashup Data Source. As said before one of the things it provides is the &amp;lsquo;master&amp;rsquo; dataSource which takes an array of igDataSource instances to be combined:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:858eaf91-2783-47a7-96e3-a45dbfd16bb0" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;&lt;span style="color:#006400;"&gt;//--- Defining the Mashup Data Source&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;mashupSources = [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ type: &lt;span style="color:#800000;"&gt;&amp;quot;remoteUrl&amp;quot;&lt;/span&gt;, dataSource: url, schema: oDataSchema, responseDataType: &lt;span style="color:#800000;"&gt;&amp;quot;jsonp&amp;quot;&lt;/span&gt;, primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ dataSource: xmlDoc, type: &lt;span style="color:#800000;"&gt;&amp;quot;xml&amp;quot;&lt;/span&gt;, primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;, schema: xmlSchema },&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ type: &lt;span style="color:#800000;"&gt;&amp;quot;remoteUrl&amp;quot;&lt;/span&gt;, dataSource: &lt;span style="color:#800000;"&gt;&amp;#39;/Home/getData&amp;#39;&lt;/span&gt;, primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt; }&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;];&lt;/li&gt;
&lt;li&gt;dsMashup = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; $.ig.MashupDataSource({ dataSource: mashupSources });&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#006400;"&gt;//--- Definition Ends&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#006400;"&gt;//continues...&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The data source (any of them) assumes that if given a string to that identically named property instead an IQueryable or an array, then that would be an URL that points to the data. So you can safely skip the defining of type being &amp;lsquo;remoteUrl&amp;rsquo; for both above. The first one is the Netflix OData as described above with URL and schema, the second is fairly obvious the xml file and the third is the JSON returning action in my Home controller.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s it! Now you are free to do with the data what you see fit &amp;ndash; call its dataBind() method that does all sorts of stuff for you ( fire bind related events, analiza data, perform requests, transform data and so on) and you can use the callback function to display the data once it&amp;rsquo;s ready like in the sample linked above OR you can provide it to an UI control to display as we will now do with the igHIerarchicalGrid.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Presenting your data&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s almost as easy as it gets &amp;ndash; you setup the jQuery Hierarchical grid widget like you normally would and use the keys from any source freely, just like that:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:30dd84fc-8868-4ad4-87a0-f6480c9f18ba" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#fff;max-height:400px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;table&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;grid&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;table&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ba60f9b5-3dcb-4f9d-99c1-434b8190322f" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:200px;overflow:auto;"&gt;&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;white-space:nowrap;"&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style="color:#800000;"&gt;&amp;quot;#grid&amp;quot;&lt;/span&gt;).igHierarchicalGrid({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateLayouts: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;defaultChildrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Fans&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;childrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Fans&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns: [&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//{ headerText: &amp;quot;ID&amp;quot;, key: &amp;quot;Id&amp;quot; }, /* optional row if you want to see the ID */&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Movie Name&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Image&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;BoxArt&amp;quot;&lt;/span&gt;, format: &lt;span style="color:#800000;"&gt;&amp;quot;&amp;lt;img src=\&amp;quot;{0}\&amp;quot; class=&amp;#39;tooltip-grid-image&amp;#39;&amp;gt;&amp;lt;/img&amp;gt;&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Average Rating&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;AverageRating&amp;quot;&lt;/span&gt; },&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ headerText: &lt;span style="color:#800000;"&gt;&amp;quot;Notes from XML&amp;quot;&lt;/span&gt;, key: &lt;span style="color:#800000;"&gt;&amp;quot;Notes&amp;quot;&lt;/span&gt; }&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columnLayouts: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataSource: dsMashup,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;100%&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;span style="color:#800000;"&gt;&amp;quot;500px&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;});&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As seen in column definitions you shouldn&amp;rsquo;t feel the difference from using a single source &amp;ndash; and that&amp;rsquo;s the whole point! And just like that set the dataSource of the grid to our Mashup (line 20) and you are done. &lt;/p&gt;
&lt;h1&gt;Results&lt;/h1&gt;
&lt;p&gt;And just like that you have a hierarchical grid, data gathered from three different origins &amp;ndash; all done fast and easy, keeping to familiar API and methods with a result that is not only very functional and neat but also looking quite well :&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/11.2/JQUERY/Mashup-Data-Source/Mashup-data-source_hierarchical-grid.png" alt="jQuery Mashup Data Source consumed by a hierarchical grid" title="jQuery Mashup Data Source consumed by a hierarchical grid" /&gt;&lt;/p&gt;
&lt;p&gt;Again the first 3 columns come directly from the Netflix catalogue, the Notes next to them come from an xml file. The child layouts in this structure come from randomly generated collection on the server-side just for the sake of the example and .. for the fun, really.&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;From this blog you&amp;rsquo;ve hopefully learned a bit more about the ever so important jQuery Data Source component that is there for every data-bound control to ease your work so much. You&amp;rsquo;ve also seen what the Mashup version of it can do, how you can combine data sources into a single collection and how you can display them with style and maintain familiar feeling and existing functionality with little to no hassle. The again what you would do with it is really up to your needs and for almost any scenario this component is equipped to handle. &lt;/p&gt;
&lt;p&gt;Some useful links: &lt;a target="_blank" href="http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=igDataSource_igDataSource_Overview.html" title="Help Topics on the NetAdvantage for jQuery Online Documentation"&gt;Our Online Documentation&lt;/a&gt;, the &lt;a target="_blank" href="http://help.infragistics.com/jQuery/2011.2/ig.DataSource" title="NetAdvantage for jQuery Data SOurce API references"&gt;API references in there&lt;/a&gt; and the &lt;a target="_blank" href="http://samples.infragistics.com/jquery/data-source" title="NetAdvantage for jQuery Online Samples : Data Source"&gt;Online samples&lt;/a&gt; and as always you can download the &lt;a href="http://media.infragistics.com/community/Release/11.2/JQUERY/Mashup-Data-Source/MashuDataSource_Demo.zip"&gt;demo project (ASP.NET MVC)&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>jQuery Hierarchical Grid - Load On Demand</title><link>http://forums.infragistics.com/blogs/damyan_petev/archive/2012/02/15/jquery-hierarchical-grid-load-on-demand.aspx</link><pubDate>Wed, 15 Feb 2012 13:00:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:332605</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;The Hierarchical Grid (a fairly recent addition to our NetAdvatage for jQuery) is a client-side control that can display hierarchical ( or nested data if you will, the kind of stuff you would use an Org chart or a tree of some sorts to visualize). Now while in some cases other controls just may do, when presented with large amount of information and it requires a table-like representation then the igHierarchicalGrid should definitely be your go-to control. Using a hierarchical grid representation is a amazing reduction in terms of space required per data unit as it allows for not only child layouts to be collapsed and expanded but also provides paging and all the things you&amp;rsquo;d expect from a grid. And while this is all great, it kind of makes you wonder where else you can save up some. There is, in fact, a very obvious route to take &amp;ndash; collapsing and expanding layouts sounds like a great target &amp;ndash; why have them while they are not visible? That is indeed the right question. You can say we have thought about that as such way of thinking is in the very design of the control &amp;ndash; the hierarchical grid is relying on the flat igGrid control to display child layouts and it creates an instance &lt;strong&gt;&lt;em&gt;only&lt;/em&gt;&lt;/strong&gt; when a row is actually expanded. What this means is that all the markup (HTML elements) that might represent a 50 rows worth of child entries would not be created and sit around until and if the user decides to expand their parent row. This reduces the total resources required and at the end of the day it equals performance boost. &amp;ldquo;Good!&amp;rdquo;, you might say, yet there is .. more! The Hierarchical Grid is already taking care of its child UI elements for you, but what about the data? Of course that essential side has not been forgotten and the igHierarchicalGrid comes with a &amp;lsquo;Load On Demand&amp;rsquo; support. What this brings is the ability to load data only when it is required making that control that much more lightweight and while enabling it, you also lay the foundations for some other nifty features such a remote paging, filtering and sorting. You are, however, required to give it a little push, so keep reading to see how to do just that!&lt;/p&gt;
&lt;p&gt;Also here&amp;rsquo;s and inspirational screenshot of that all-time favourite spinning indicator users would and should see when they must be informed something in the background is happening and that is pretty much the only indication something like Load On Demand is active. Keep in mind this took several attempts to nail the split-second the indicator is visible, so bear with me on its aesthetics :)&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/11.2/JQUERY/Hierarchical_Grid-Load_On_Demand/jQuery-Hierarchical-Grid_Load-on-Demand.png" title="jQuery Hierarchical Grid Loading on Demand" alt="jQuery Hierarchical Grid Loading on Demand" /&gt;&lt;/p&gt;
&lt;h1&gt;Load on Demand with jQuery &lt;/h1&gt;
&lt;p&gt;Now if you&amp;rsquo;ve been examining the jQuery API of the Hierarchical Grid you might be wondering where is that &amp;lsquo;loadOnDemand&amp;rsquo; property? Simply put, the jQuery widget doesn&amp;rsquo;t really have one. To be completely thorough&amp;hellip; the ASP.NET MVC helper does have one (as it sets up some behind-the-scenes server magic) but more on that later on. The widget doesn&amp;rsquo;t need that as it is a client control completely independent from server technology and as such in no way does it implement loading data on demand, but rather it should be made aware of such opportunity and if the proper setting are in place the grid will take advantage of it. With that said, the control can consume &lt;a title="Open Data Protocol (OData) homepage." href="http://www.odata.org/" target="_blank"&gt;OData (Open Data Protocol)&lt;/a&gt; and with the very nature of the protocol that spells querying data (including paging, ordering and filtering) what follows seems completely natural &amp;ndash; when presented with OData the grid will use it to request data only when needed &amp;ndash; yes, loading it demand. That means that if you have your information exposed with OData protocol you are almost ready! All that is left to do to get the feature is three properties:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0cf15aef-f333-4962-a631-96ec22a40bbb" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt;
&lt;li&gt;$(&lt;span style="color:#800000;"&gt;&amp;quot;#hierarchicalGrid&amp;quot;&lt;/span&gt;).igHierarchicalGrid({&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//--Set up for Load on demand follows:&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;odata: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;initialDataBindDepth: 0,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dataSource: oDataInJson,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;responseDataKey: &lt;span style="color:#800000;"&gt;&amp;#39;d&amp;#39;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//--end--&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columnLayouts: [&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: &lt;span style="color:#800000;"&gt;&amp;quot;Products&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;responseDataKey: &lt;span style="color:#800000;"&gt;&amp;#39;d&amp;#39;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;childrenDataProperty: &lt;span style="color:#800000;"&gt;&amp;quot;Products&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoGenerateColumns: &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;primaryKey: &lt;span style="color:#800000;"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;],&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;span style="color:#800000;"&gt;&amp;quot;700px&amp;quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;});&lt;/li&gt;
&lt;/ol&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As seen in lines 4 through 7 there isn&amp;rsquo;t all too much complication about it &amp;ndash; make the grid aware OData will be used (setting the respective property to &amp;lsquo;true&amp;rsquo;) and provide a source. &lt;/p&gt;
&lt;p&gt;The initial data bind depth is obligatory and it tells the grid just how much in the nested data structure should it dig right from the start and while usually that means setting it to as many levels your data has or even &amp;ndash;1 for the &amp;ldquo;I don&amp;rsquo;t know! Can&amp;rsquo;t you just figure it out and load everything?&amp;rdquo; case, when the goal is loading on demand you want that to be zero &amp;ndash; as in just the first(parent) tier of entries will be loaded.&lt;/p&gt;
&lt;p&gt;The response key is telling the grid how to look at your data and is specific to it as well. It is only needed when that data is wrapped and it points to where the array of records is. Let&amp;rsquo;s have a more descriptive example &amp;ndash; as seen above is is set to &amp;lsquo;d&amp;rsquo; and that is because in that demo the sample OData service response looks like.. &lt;/p&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;" id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; ?({&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;d&amp;quot;&lt;/span&gt; : [&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;__metadata&amp;quot;&lt;/span&gt;: {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;uri&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;http://services.odata.org/OData/OData.svc/Categories(0)&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;ODataDemo.Category&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt; }, &lt;span style="color:#006080;"&gt;&amp;quot;ID&amp;quot;&lt;/span&gt;: 0, &lt;span style="color:#006080;"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Food&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Products&amp;quot;&lt;/span&gt;: {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color:#008000;"&gt;//rest is omitted&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Now take the NorthWind sample service for example:&lt;/p&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;width:97.5%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;padding:4px;" id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; ?({&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;d&amp;quot;&lt;/span&gt; : {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;results&amp;quot;&lt;/span&gt;: [&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;__metadata&amp;quot;&lt;/span&gt;: {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;quot;uri&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;http://services.odata.org/Northwind/Northwind.svc/Customers(&amp;#39;ALFKI&amp;#39;)&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;NorthwindModel.Customer&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt; }, &lt;span style="color:#006080;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;ALFKI&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;CompanyName&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Alfreds Futterkiste&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;ContactName&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Maria Anders&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;ContactTitle&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Sales Representative&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Address&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Obere Str. 57&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Berlin&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Region&amp;quot;&lt;/span&gt;: &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;PostalCode&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;12209&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;Germany&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Phone&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;030-0074321&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Fax&amp;quot;&lt;/span&gt;: &lt;span style="color:#006080;"&gt;&amp;quot;030-0076545&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;: {&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color:#008000;"&gt;//rest is omitted&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this case the response key would be &amp;ldquo;d.results&amp;rdquo;. Simple enough and again specific to how you present your data.&lt;/p&gt;
&lt;p&gt;In the light of all this you can check out Taz&amp;rsquo;s blog on &lt;a title="A blog on using OData with jQuery Hierarchical Grid by Taz Abdeali" href="http://blogs.infragistics.com/blogs/taz_abdeali/archive/2012/01/24/using-odata-with-jquery-hierarchical-grid.aspx" target="_blank"&gt;Using OData with jQuery Hierarchical Grid&lt;/a&gt; where you can find not only a full guide but also a link to a live demo!&lt;/p&gt;
&lt;p&gt;If you take a look at the example in that blog you might notice the datasource is set to the service URL. This is because the grid itself will use a igDataSource control to bind to data and as such it is available for you as well. If you want to tweak some of its setting you can define your data source like so:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c1740a1d-78a2-46b0-9430-51129a30e5d9" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; oDataInJson = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; $.ig.JSONPDataSource(&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ dataSource: &lt;span style="color:#800000;"&gt;&amp;#39;http://services.odata.org/OData/OData.svc/Categories?$format=json&amp;amp;$callback=?&amp;#39;&lt;/span&gt;, &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;responseDataKey: &lt;span style="color:#800000;"&gt;&amp;quot;d&amp;quot;&lt;/span&gt; &lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can read more about this control in our&amp;nbsp; &lt;a title="Help topics on the Infragistics jQuery-based data source control." href="http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=igDataSource_igDataSource.html" target="_blank"&gt;Help Topics&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;Load On Demand with ASP.NET MVC&lt;/h1&gt;
&lt;p&gt;Unlike the majority of our jQuery products where the helpers mostly mirror the widget&amp;rsquo;s settings and add some comforts for those used to writing in a managed environment, this time it&amp;rsquo;s different. As said above the igHierarchicalGrid MVC wrapper does have a Load On Demand property. When that is set to true the wrapper provides utility to send&amp;nbsp; responses to the client in JSON format. To be more specific it is the grid&amp;rsquo;s model that provides the support for that. There&amp;rsquo;s a catch though &amp;ndash; the responses use the model&amp;rsquo;s GetData() method and&amp;nbsp; that means the model is needed wherever those responses are created, which makes setting up the grid in the View with chaining syntax something you might want to avoid. The model of the grid along with all the properties should be then defined in either the Controller of the Model. There is also one more thing to note &amp;ndash; the model creating is best done in a separate method and here&amp;rsquo;s the full code for one:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:aa8444fb-4d1f-4564-9850-ad11fe0c4383" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#fff;max-height:400px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Infragistics.Web.Mvc;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:20a6b3cc-192b-43ea-8e13-89c364ed1a6f" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridModel&lt;/span&gt; CreateGridModel()&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridModel&lt;/span&gt; grid = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridModel&lt;/span&gt;();&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;// Set up properties and columns:&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.AutoGenerateColumns = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.Columns = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;&amp;gt;();&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Customer&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;300px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Company Name&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;CompanyName&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;150px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;150px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.PrimaryKey = &lt;span style="color:#a31515;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.AutoGenerateLayouts = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;// Create child layout&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridColumnLayoutModel&lt;/span&gt; layout = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumnLayoutModel&lt;/span&gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Key = &lt;span style="color:#a31515;"&gt;&amp;quot;Orders&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.ForeignKey = &lt;span style="color:#a31515;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.PrimaryKey = &lt;span style="color:#a31515;"&gt;&amp;quot;OrderID&amp;quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.AutoGenerateColumns = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Columns = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;&amp;gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Order ID&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;OrderID&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;number&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;100px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Customer&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;CustomerID&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;string&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;100px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Order Date&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;OrderDate&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;date&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;150px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Columns.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridColumn&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Shipped Date&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;ShippedDate&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;date&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;150px&amp;quot;&lt;/span&gt;));&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;// Add paging to child layouts (different from the parent&amp;#39;s)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridPaging&lt;/span&gt; layoutPaging = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridPaging&lt;/span&gt;();&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layoutPaging.VisiblePageCount = 2;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layoutPaging.PageSize = 5;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layoutPaging.Type = &lt;span style="color:#2b91af;"&gt;OpType&lt;/span&gt;.Remote;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout.Features.Add(layoutPaging);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//add that layout to the grid&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.ColumnLayouts.Add(layout);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//most importantly turn Load On demand on and define response Urls:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.LoadOnDemand = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.DataSourceUrl = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Url.Action(&lt;span style="color:#a31515;"&gt;&amp;quot;BindParent&amp;quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.ColumnLayouts[0].DataSourceUrl = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Url.Action(&lt;span style="color:#a31515;"&gt;&amp;quot;BindChild&amp;quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//Also add paging to the parent layout&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridPaging&lt;/span&gt; paging = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridPaging&lt;/span&gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;paging.VisiblePageCount = 2;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;paging.PageSize = 10;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;paging.Type = &lt;span style="color:#2b91af;"&gt;OpType&lt;/span&gt;.Remote;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.Features.Add(paging);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;// Return the finished model&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; grid;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You will have to scroll down a bit to get to the part we are interested in &amp;ndash; starting at line 39 where the LoadOnDemand property is set to true. The layouts had to be created before that so data source URL-s can now be assigned to them. &lt;/p&gt;
&lt;p&gt;Now back to the subject of JSON responses as seen above we have defined a grid model with two levels of hierarchy &amp;ndash; a parent entries with child entries. Therefore we have the &amp;ldquo;BindParent&amp;rdquo; and &amp;ldquo;BindChild&amp;rdquo; as seen above. A very important note to take is that such a response is required for each layout, so one method returning requested data for each level in your data. As mentioned those methods would use the model&amp;rsquo;s GetData(), this is why we moved its creation to a separate method, because it is used to pass the model to the view and in all of those methods as well. Their return type should be JsonResult as that is what the grid would expect, but you don&amp;rsquo;t have to worry about converting data yourself. This is how those look:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:71011fc1-3437-4085-be32-69f58d1a35f7" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;JsonResult&lt;/span&gt; BindParent()&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//create a model&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridModel&lt;/span&gt; grid = CreateGridModel();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//set its datasource&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; dataContext = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;NorthwindDataContext&lt;/span&gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; dataSource = dataContext.Customers;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.DataSource = dataSource.Take(30);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//and use the GetData() method to return the results&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; grid.GetData();&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And then you have the one for the child layout:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:89bb0e5f-24d0-4a62-8886-c3d82d96dde8" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;JsonResult&lt;/span&gt; BindChild(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; path, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; layout)&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//create a model&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridModel&lt;/span&gt; grid = CreateGridModel();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//set its datasource&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; dataContext = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;NorthwindDataContext&lt;/span&gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; dataSource = dataContext.Orders;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grid.DataSource = dataSource;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008000;"&gt;//and use the GetData() method to return the results&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; grid.GetData(path, layout);&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Notice we never defined data source in the model creation method and also notice the response methods set that to the proper table for each layout. Notice as well that the parent requires no parameters &amp;ndash; this is based on the way the grid performs internal requests. Parameters guide the method on which layout should the data be set and also its path in the hierarchy. The general path format would describe the sequence in which rows were expanded like so:&lt;/p&gt;
&lt;p&gt;PrimaryKeyID/ChildPrimaryKeyID/AnotherChildKey[layout name]. &lt;/p&gt;
&lt;p&gt;Based on how your grid/data is set up any of the expanded rows&amp;rsquo; keys in the path can go with a layout name if it is specific to it. In the case above that would mean the PrimaryKeyID would be the guide for the children under that specific row in the parent, then from them the children of the ChildPrimaryKeyID row and then the specific child layout under AnotherChildKey from the latter. This might seem somewhat confusing but take it like this &amp;ndash; it is true to its name &amp;ndash; you start from the root (notice it is not mentioned in the path) move down the keys following the hierarchy to get to required data. Now the path above is for 4 levels of hierarchy and since the example so far is just two we only get the first part in the path &amp;ndash; the PrimaryKeyID which would be the id of the expanded parent row and look like:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.infragistics.com/community/Release/11.2/JQUERY/Hierarchical_Grid-Load_On_Demand/jQuery-Hierarchical-Grid_Load-on-Demand-path.png" title="jQuery Hierarchical Grid Load on demand request path." alt="jQuery Hierarchical Grid Load on demand request path." /&gt;&lt;/p&gt;
&lt;p&gt;And as you may have already guessed an request with empty path would mean the parent level, thus the BindParent takes zero arguments. &lt;/p&gt;
&lt;h1&gt;Events&lt;/h1&gt;
&lt;p&gt;The jQuery Hierarchical Grid offers two events related to Load On Demand. You can start by reading a blog written by Jordan Tsankov on just that &amp;ndash; &lt;a title="A blog on Handling Events in the jQuery Hierarchical Grid" href="http://blogs.infragistics.com/blogs/jordan_tsankov/archive/2012/01/30/jquery-hierarchical-grid-handling-events.aspx" target="_blank"&gt;Handling Events in the igHierarchicalGrid&lt;/a&gt;. The basic principals on using the LoadOnDemand events is just the same as using rowExpanding or rowCollapsed you can see in that blog. The widget will fire two events consequently upon loading requested data &amp;ndash; first &amp;lsquo;childrenPopulating&amp;rsquo; and then the standard &amp;lsquo;childrenPopulat&lt;strong&gt;ed&lt;/strong&gt;&amp;rsquo;. As always the &amp;lsquo;-ing&amp;rsquo; even fires as child layout is just about to be populated with data and is cancellable, while the other event is fired after the population is complete and is not cancellable. Following the convention you can hook up an event handler by just using the name of the control plus the name of the event without further complications like so:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:12f8d570-444e-42e2-9745-103efb929672" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt;
&lt;li&gt;$(&lt;span style="color:#800000;"&gt;&amp;quot;#hierarchicalGrid&amp;quot;&lt;/span&gt;).live(&lt;span style="color:#800000;"&gt;&amp;quot;ighierarchicalgridchildrenpopulating&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (evt, args) {&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//you can decline loading data for certain rows, like some that may not even have child items&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//calcel out if calling row with key ID of 0&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (args.id == &lt;span style="color:#800000;"&gt;&amp;quot;ID:0&amp;quot;&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;}&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//define you own logic to hanle the event&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;});&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As you can find in our &lt;a title="Hierarchical jQuery Grid control API" href="http://help.infragistics.com/jQuery/2011.2/ui.ighierarchicalgrid" target="_blank"&gt;API&lt;/a&gt; and in Jordan&amp;rsquo;s blog above you have access to plenty of information about the event and the participants and for the sake of keeping it simple the example above just uses the special ID formed by the row&amp;rsquo;s primary key and its value to check if the event has been fired while activating load on demand from the very first row. The demo for this project includes event logging for both MVC and OData implementations, so you can check that one out.&lt;/p&gt;
&lt;h1&gt;The Added benefits&lt;/h1&gt;
&lt;p&gt;If you remember from the introduction enabling load on demand would also lay foundations for other remote functionalities. You probably have figured it out the moment OData was mentioned &amp;ndash; the protocol providers support those features and the grid will make the appropriate requests when remote paging, filtering, sorting and even summaries!&lt;/p&gt;
&lt;p&gt;Then there is even more! The MVC wrapper being witty and all will not only parse and execute hierarchical data requests. It is also capable of querying data based on other options it recognizes in the grid&amp;rsquo;s request &amp;ndash; which means that you simply instruct the grid to perform remote those actions and it will create the appropriate requests and the getData() method will return the correct rows. It really is that simple, you define options, set them to remote and don&amp;rsquo;t even bother setting up URL key(s) for filtering or sorting like you are normally required to. Here&amp;rsquo;s what you can &lt;strong&gt;&lt;em&gt;simply add&lt;/em&gt;&lt;/strong&gt; to the CreateModel method from above:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f2b10d2f-9448-47ca-8dd1-9dc3a3e284ca" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#ddd;max-height:400px;overflow:auto;"&gt;
&lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#008000;"&gt;//Add features:&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridSorting&lt;/span&gt; sorting = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridSorting&lt;/span&gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;sorting.Type = &lt;span style="color:#2b91af;"&gt;OpType&lt;/span&gt;.Remote;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;grid.Features.Add(sorting);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridPaging&lt;/span&gt; paging = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridPaging&lt;/span&gt;();&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;paging.PageSize = 10;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;paging.Type = &lt;span style="color:#2b91af;"&gt;OpType&lt;/span&gt;.Remote;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;grid.Features.Add(paging);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;GridFiltering&lt;/span&gt; filtering = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GridFiltering&lt;/span&gt;();&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;filtering.Type = &lt;span style="color:#2b91af;"&gt;OpType&lt;/span&gt;.Remote;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;filtering.Mode = &lt;span style="color:#2b91af;"&gt;FilterMode&lt;/span&gt;.Simple;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;grid.Features.Add(filtering);&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The Load on Demand functionality of the NetAdvantage for jQuery Hierarchical Grid will keep it simple and reward with great results. Should you choose to expose your data via the Open Data Protocol (OData), your client-side implementation of the control will readily take advantage of all it can offer and handle the requests for you with little to no extra effort. And if you prefer different approach the wrapper will assist you greatly in enabling such functionality on your server-side as well as once more managing requests and generating proper responses. And while doing that Load On Demand would also become available for a number of features that can be performed remotely such as paging, summaries, sorting and filtering.&lt;/p&gt;
&lt;p&gt;A read you might find interesting in our help topics would be the &lt;a title="Getting started with igGrid, oData and WCF Data Services guide" href="http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=igGrid_Getting_Started_With_igGrid_oData_and_WCF_Data_Services.html" target="_blank"&gt;Getting started with igGrid, oData and WCF Data Services&lt;/a&gt; guide in our Help Topics which is another way you can consume OData with your grid.&lt;/p&gt;
&lt;p&gt;Also head over to our &lt;a title="jQuery Hierarchical Grid Sample" href="http://samples.infragistics.com/jquery/hierarchical-grid/hierarchical-grid-load-on-demand" target="_blank"&gt;Samples&lt;/a&gt; to try it out and you can also download the &lt;a title="Hierarchical Grid Load on demand Demo project." href="http://media.infragistics.com/community/Release/11.2/JQUERY/Hierarchical_Grid-Load_On_Demand/load-on-demand_Demo.zip" target="_blank"&gt;Demo project&lt;/a&gt; accompanying this blog in which you will find implemented ASP.NET MVC using the wrapper and a pure jQuery / JavaScript implementation consuming OData.&lt;/p&gt;</description></item></channel></rss>