<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.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 tag 'OData'</title><link>http://community.infragistics.com/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=OData&amp;orTags=0</link><description>Search results matching tag 'OData'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Tips on Drag &amp;amp; Drop with the Ignite UI Tree</title><link>http://community.infragistics.com/blogs/damyan_petev/archive/2012/12/19/tips-on-drag-amp-drop-with-the-ignite-ui-tree.aspx</link><pubDate>Wed, 19 Dec 2012 17:23:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:386139</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;&lt;img title="Tips on Drag &amp;amp; Drop with the Ignite UI Tree" style="float:left;margin:0px 5px 0px 0px;display:inline;" alt="Tips on Drag &amp;amp; Drop with the Ignite UI Tree" align="left" src="http://media.infragistics.com/community/Release/12.2/jQuery/Tree-Drag-Drop/ignite-ui-tips-tree-drag-drop.png" /&gt;As promised in the previous blog on &lt;a title="Ignite UI Tree Drag &amp;amp; Drop" href="http://www.infragistics.com/community/blogs/damyan_petev/archive/2012/12/13/ignite-ui-tree-drag-and-drop.aspx" target="_blank"&gt;Drag &amp;amp; Drop with the Ignite UI Tree&lt;/a&gt; – some tips and tricks coming right up. If you haven’t already looked into the control’s features, now’s your chance – overview with main ones listed in the &lt;a title="igTree Overview - Ignite UI&amp;trade; Online Help ::  2012.2" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=igTree_Overview.html" target="_blank"&gt;Documentation&lt;/a&gt; and &lt;a title="Ignite UI online samples - jQuery Tree" href="http://www.infragistics.com/products/jquery/tree" target="_blank"&gt;live in the Samples&lt;/a&gt;. Looking at those, while each of them is rather nice, how do you think some of them would work alongside each other…and is something missing? The first one is always a potential trouble maker and the latter.. well extending functionality is fun, but as you know there are always new stuff coming with each release – might be just the thing you are missing. We do take feedback on everything through socials (links always below), there’s an active community at the &lt;a title="Forums &amp;raquo; IgniteUI - jQuery Controls" href="http://www.infragistics.com/community/forums/default.aspx?GroupID=80" target="_blank"&gt;Forums&lt;/a&gt; and you can always &lt;a title="Feature Request" href="https://www.infragistics.com/my-account/feature-request/" target="_blank"&gt;submit a feature request( must be logged in)&lt;/a&gt;. Enough with the shameless plugs, on to the discussion!&lt;/p&gt; &lt;h1&gt;Play nice?&lt;/h1&gt; &lt;p&gt;As you’ve already seen in my previous post there are some quirks for example when you have nodes moving around with Drag and Drop and &lt;strong&gt;checkboxes&lt;/strong&gt; at the same time you will loose the checkbox state and when a tri-state parent is fully checked a dropped node will respect the valid-for-all rule. &lt;/p&gt; &lt;p&gt;It’s merely the fact that while drag and drop is a nice interaction from a user standpoint, underneath it involves removing and adding nodes. While that is simple in itself, it does present a number of situations where it can be really tricky to preserve whatever state the node may have applied by multiple other features. There’s a similar scenario with &lt;strong&gt;&lt;a title="Tree Selection - Ignite UI Online Samples" href="http://www.infragistics.com/products/jquery/sample/tree/selection"&gt;selection&lt;/a&gt;&lt;/strong&gt; when you move the selected node around – you still keep the selection data, but the visual is gone as the node is re-created.&lt;/p&gt; &lt;p&gt;Then you have another &lt;a title="Tree Load on Demand - Ignite UI Online Samples" href="http://www.infragistics.com/products/jquery/sample/tree/load-on-demand"&gt;major feature of the Ignite UI Tree – the Load On Demand&lt;/a&gt;. This is an extra tricky one actually. While the moving of nodes happens entirely on the client and there’s little that can come in it’s way.. it’s really hard to add a node to a parent one that hasn’t yet populated its children. Yes, you can easily supply the UI, but the underlying data source would still contain no array of child items for you to add to. Of course, one the node populates it’s all good and cool, but as you get told everywhere users are notoriously impatient and in case they do not wait for the node to load it can get quite messy.&lt;/p&gt; &lt;p&gt;Do keep in mind thought, the Ignite UI toolset keeps evolving with not only new features, but general improvements as well and it’s certain Drag&amp;amp;Drop will become more in tune with the rest. For that reason, what I do provide for now would possible become obsolete, but it’s more of a testimony&amp;nbsp; to the fact that you can &lt;strong&gt;enhance and extend&lt;/strong&gt; Ignite UI controls with very &lt;strong&gt;little effort&lt;/strong&gt;!&lt;/p&gt; &lt;h1&gt;Play nice.. or I’ll make you!&lt;/h1&gt; &lt;p&gt;So let’s get on with the modifications. The Tree’s events will be our heroes of the day as many if not all major changes are represented with them. I have one very easy fix for maintaining proper selection UI with truly minor effort – as I said it’s all really a matter of picking the right time to hook your code. I figured it’s mildly pointless to update a second selection variable on each change, so instead I will check when a drag is starting if the node in question is selected. Then when the said node is dropped I would simply use the API method provided for selection. This will in essence go and set in the new path for the node:&lt;/p&gt; &lt;p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:7b016fcb-b36f-416d-a2b0-89982c66aa25" 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-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&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; selectionDirty = &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;false&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/p&gt; &lt;p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f6f84add-5272-4ed4-8c46-642899b39d93" 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;"&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;$(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;#tree&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).igTree({&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;dragAndDrop: &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;dragAndDropSettings: {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;dragAndDropMode: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;default&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;dragStartDelay: 100,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;revert: &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;&lt;/span&gt;&lt;span style="background:#ffffff;color:#008000;"&gt;//simple icon-only tooltip &lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;invalidMoveToMarkup: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;&amp;lt;div&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&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;containment: $(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;#tree&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;dragStart: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (evt, 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:#008000;"&gt;// check if element is the one selected&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;selectionDirty = $(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;#tree&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).igTree(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;isSelected&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;, ui.element);&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;nodeDropped: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;(evt, 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;if&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (selectionDirty) {&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;//if it was selected, re-select when dropped in new place&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; newNode = $(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;#tree&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).igTree(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;nodeByPath&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;, ui.path + &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; + ui.draggable.attr(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;data-path&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).split(&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;).pop());&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;#39;#tree&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).igTree(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;select&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;, newNode);&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;selectionDirty = &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;false&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;dataSource: northwindCategories,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;bindings: {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;textKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;CategoryName&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;primaryKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;CategoryID&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;valueKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;CategoryID&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;childDataProperty: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;Products&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;bindings: {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffffff;color:#000000;"&gt;textKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ProductName&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;valueKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ProductID&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;primaryKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ProductID&amp;#39;&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; &lt;p&gt;The difference from what you have seen before as code for the tree are the dragStart and nodeDropped events. Because those come in line of the &lt;a title="jQuery UI Interactions" href="http://api.jqueryui.com/category/interactions/"&gt;jQuery UI Draggable &amp;amp; Droppable&lt;/a&gt; events and they can generally handle interaction between two trees, you won’t see the familiar ‘ui.owner‘ to access the tree as it’s kind of hard to tell which tree should be an owner really :) However, since I’m adding handlers separately that’s okay – I know which tree to call. Also, the tree is helpful enough to give nodes by paths – the latter you can get by combining the event provided path (the parent one) and the ID of the dropped element. The way this handles it right now should be suitable for deeper hierarchy that two as well.&lt;/p&gt; &lt;p&gt;Note: Remember you have the same event arguments as in jQuery UI in addition to the Tree adding some stuff (the element for example), but in the case of the drop the element is the actual target and the draggable from the original arguments is the node being dropped. The results:&lt;/p&gt; &lt;p&gt;&lt;img title="An (very low quality) animation to show the comparison between the default selection handling and the enhanced one." alt="An (very low quality) animation to show the comparison between the default selection handling and the enhanced one." src="http://media.infragistics.com/community/Release/12.2/jQuery/Tree-Drag-Drop/ignite-ui-tree-drag-drop-selection.gif" /&gt;&lt;/p&gt; &lt;p&gt;You can take a very similar approach with the checkboxes in bi-state mode Trees to complement that feature, however, the tri-state limitation I feel might be the right design (respecting the parent global state). Up to you really, the option is there.&lt;/p&gt; &lt;h3&gt;Load on Demand&lt;/h3&gt; &lt;p&gt;As I mentioned it’s nothing that complicated stopping this from being flawless, except the very nature of loading data on demand..it’s not there yet! And if the user doesn’t want to wait things go bad. One very simple way is to decrease the expand delay (time till nodes automatically expand when dragged over) to mere nothing. This might make it work just fine if the service you use is fast enough to get ahead of the unsuspecting user. However, go too low and you risk the user triggering a whole bunch of requests on the drag path and actually making the application slower rather than faster. The solution lies in not letting the user drop on non-populated node. However, that would mean that at some point the node would expand and drop would be possible, but the helper will still be showing invalid location. It’s not such a nice experience to make the user shake the node around to force a drag and re-evaluation of the drop target. If you want just the perfect experience, you can have it with one trick – move the mouse for the user! Yup, basically listen for when the node is populated, check if the user is on top of it, and trigger a mouse move so the validation will be re-done:&lt;/p&gt; &lt;p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8f015cc3-6916-4e15-8f1d-59549962b0dc" 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;"&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; stateHelper = { dropTarget: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;null&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;, populatingNode: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;null&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;, draggedNode: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;null&lt;/span&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;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e9a0182a-2ed0-48be-ae0d-b749d54a6136" 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;$(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;#tree&amp;quot;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).igTree({&lt;/span&gt;&lt;/li&gt; &lt;li&gt;     &lt;span style="background:#ffffff;color:#000000;"&gt;dragAndDrop: &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;parentNodeImageClass: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;parent&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;dragAndDropSettings: {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;         &lt;span style="background:#ffffff;color:#000000;"&gt;dragAndDropMode: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;move&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;customDropValidation: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (element) {&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;// Validates the drop target:&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;// Nodes will properly cause targets to expand (and therefore load)&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;// But we must not allow actual drop before the data is loaded &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;// because we have nothing to add this node to.&lt;/span&gt;&lt;/li&gt; &lt;li&gt;             &lt;span style="background:#ffffff;color:#000000;"&gt;stateHelper.dropTarget = $(&lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;this&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;stateHelper.draggedNode = $(element);&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; childNodes = stateHelper.dropTarget.closest(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;li[data-role=node]&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).children(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ul&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;if&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (childNodes.length &amp;gt; 0 &amp;amp;&amp;amp; JSON.parse(childNodes.attr(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;data-populated&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;)) === &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;false&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;return&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;false&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;&amp;nbsp;&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;return&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &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;},&lt;/span&gt;&lt;/li&gt; &lt;li&gt;         &lt;span style="background:#ffffff;color:#000000;"&gt;expandDelay: 500&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;dragStop: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;(evt, ui) {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;         &lt;span style="background:#ffffff;color:#000000;"&gt;stateHelper.dropTarget = undefined;&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;nodePopulated: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;(evt, 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;if&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (stateHelper.dropTarget &amp;amp;&amp;amp; $.contains(ui.element, stateHelper.dropTarget)) {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;             &lt;span style="background:#ffffff;color:#000000;"&gt;stateHelper.populatingNode = ui.element;&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;rendered: &lt;/span&gt;&lt;span style="background:#ffffff;color:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;(evt, 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;if&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; (stateHelper.populatingNode) {&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;// forse re-handling of the drag in case the user manages to &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;// shomehow keep his mouse steady when the node expands&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;// this will evaluate the target again&lt;/span&gt;&lt;/li&gt; &lt;li&gt;             &lt;span style="background:#ffffff;color:#000000;"&gt;stateHelper.populatingNode.children(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).trigger({&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;#39;mousemove&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;pageX: stateHelper.draggedNode.data(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;draggable&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).position.left,&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                 &lt;span style="background:#ffffff;color:#000000;"&gt;pageY: stateHelper.draggedNode.data(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;draggable&amp;#39;&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt;).position.top&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;stateHelper.populatingNode = undefined;&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;dataSourceType: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;remoteUrl&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;dataSource: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;http://services.odata.org/OData/OData.svc/Categories?$format=json&amp;amp;$callback=?&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;responseDataKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;d&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;loadOnDemand: &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;bindings: {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;         &lt;span style="background:#ffffff;color:#000000;"&gt;textKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;Name&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;valueKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ID&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;primaryKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ID&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;childDataProperty: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;Products&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;bindings: {&lt;/span&gt;&lt;/li&gt; &lt;li&gt;             &lt;span style="background:#ffffff;color:#000000;"&gt;textKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;Name&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;valueKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ID&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;primaryKey: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;ID&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;childDataProperty: &lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;#39;Supplier&amp;#39;&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; &lt;p&gt;As you can see the Tree is bound to the oData Northwind service making calls only when needed, we listen for populated nodes and save them in the ‘stateHelper’ to later trigger the mouse move on them when the UI has been rendered.&lt;/p&gt; &lt;p&gt;&lt;img title="A demonstation of how the experience can be improved with load on demand and Drag&amp;amp;Drop" alt="A demonstation of how the experience can be improved with load on demand and Drag&amp;amp;Drop" src="http://media.infragistics.com/community/Release/12.2/jQuery/Tree-Drag-Drop/drag-drop-load-on-demand.gif" /&gt;&lt;/p&gt; &lt;h3&gt;A word on the custom validation function&lt;/h3&gt; &lt;p&gt;The thing about this functions is that it will be overridden by the internal tree validation, which makes it the last last chance for you as a developer to return false and prevent a node drop on that target. What this also should tell you is that the internal validation will try to validate actual Ignite UI Tree as a target, so your function is not to enable something the feature won’t allow – no call will be made to it when the target is foreign. This begs the question, can you still use other targets? Yes, the drop events still fire on the drop targets! Take the &lt;a title="Simple File Manager - Ignite UI samples" href="http://www.infragistics.com/products/jquery/sample/tree/simple-file-manager" target="_blank"&gt;Simple File Manager&lt;/a&gt; as an example – the trick is in the usage of the droppable events instead!&lt;/p&gt; &lt;p&gt; And as you have already seen form above the context of the function is the droppable element and the parameter is the draggable.&lt;/p&gt; &lt;p&gt;Last but not least, if you are wondering how this JavaScript function is being used with the ASP.NET MVC wrappers, the MVC side property accepts a string with the function’s name. What that means is that such functions need to be discoverable on the global scope (on window really), so be careful where you define it:&lt;/p&gt; &lt;p&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8dcd4c16-8da9-423a-908c-0e534529eb9e" 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;"&gt; &lt;li&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;span style="background:#ffffff;color:#008000;"&gt;//rest is omitted&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="background:#ffffff;color:#000000;"&gt;}).DragAndDropSettings(d =&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;d.ExpandDelay(500);&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="background:#ffffff;color:#000000;"&gt;d.CustomDropValidation(&lt;/span&gt;&lt;span style="background:#ffffff;color:#a31515;"&gt;&amp;quot;customValidation&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;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/p&gt; &lt;p&gt;And then:&lt;/p&gt; &lt;h1&gt; &lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f6d2fdd6-77fd-4f56-80c7-af2dddb81183" 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;"&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;script&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:#0000ff;"&gt;function&lt;/span&gt;&lt;span style="background:#ffffff;color:#000000;"&gt; customValidation(element) {&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;// omitted&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;script&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;/h1&gt; &lt;h1&gt;Resources&lt;/h1&gt; &lt;p&gt;First let me again remind of the &lt;a title="igTree Overview - Ignite UI&amp;trade; Online Help ::  2012.2" href="http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=igTree_Overview.html" target="_blank"&gt;elaborate Ignite UI Tree Documentation&lt;/a&gt; and &lt;a title="Ignite UI jQuery API Reference" href="http://help.infragistics.com/jQuery/2012.2/ui.igtree" target="_blank"&gt;jQuery API Reference&lt;/a&gt;. Then don’t forget the &lt;strong&gt;&lt;a title="Ignite UI Tree samples" href="http://www.infragistics.com/products/jquery/tree" target="_blank"&gt;awesome samples&lt;/a&gt;! &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This time I’ll add in the mix a &lt;a title="ASP.NET MVC demo project for the Ignite UI Tree&amp;#39;s Drag and Drop feature" href="http://media.infragistics.com/community/Release/12.2/jQuery/Tree-Drag-Drop/tree-drag-drop-tips.zip" target="_blank"&gt;solid ASP.NET MVC demo project&lt;/a&gt; ( with everything from here included in with both MVC helper and script-only demos, plus some basic stuff from the previous post). &lt;strong&gt;Make sure to check that one out, the animations above don’t do it justice!&lt;/strong&gt;&amp;nbsp; You would need at least a trial version of Ignite UI so hit the banner below if you are still lacking one.&lt;/p&gt; &lt;p&gt;Also you can go for fiddling with two demos on JSFiddle:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a title="Ignite Ui Tree: Basic settings and events + enhanced selection demo on JSFiddle" href="http://jsfiddle.net/damyanpetev/TZXP2/" target="_blank"&gt;Basic settings and events + enhanced selection demo&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a title="Ignite UI Tree: Modified Drag&amp;amp;Drop + Load On Demand behavior with Custom drop validation function on JSFiddle." href="http://jsfiddle.net/damyanpetev/uLxax/" target="_blank"&gt;Modified Drag&amp;amp;Drop + Load On Demand behavior with Custom drop validation function.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Stay tuned,&lt;/strong&gt; for there is still more awesome tricks I have for you – next time we’ll do some updating support!&lt;/p&gt; &lt;h1&gt;Summary&lt;/h1&gt; &lt;p&gt;This was the second part of the in-depth look at the Ignite UI Tree’s Drag and Drop feature. We covered some of the challenges such functionality presents and how you can overcome them. We improved the selection handling of moved nodes, we made the experience a true joy with Load on Demand. We also gave a little attention to the custom validation function – what is it for, what to expect and what you can do with it. At the end of this, I would like to remind you that this has been a proof of the concept that the controls are flexible enough to let you mold them to your needs with little code and great impact!&lt;/p&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;&lt;em&gt;And as always, you can follow us on Twitter &lt;/em&gt;&lt;a title="That would be me!" href="https://twitter.com/DamyanPetev"&gt;&lt;em&gt;@DamyanPetev&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &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>Introducing ReportPlus: Building Enterprise Dashboards on the iPad</title><link>http://community.infragistics.com/blogs/gabriel-lopez/archive/2012/09/19/introducing-reportplus-building-enterprise-dashboards-on-the-ipad.aspx</link><pubDate>Wed, 19 Sep 2012 15:53:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:373374</guid><dc:creator>glopez@infragistics.com</dc:creator><description>&lt;p&gt;A long time ago, in a galaxy far far away we set out to build a solution that would challenge in some way the current status quo in the &lt;strong&gt;mobile business intelligence&lt;/strong&gt; segment that treats the &lt;strong&gt;iPad&lt;/strong&gt; pretty much as a one-way, consuming only experience, as a second class citizen.&lt;/p&gt;
&lt;p&gt;In a time where mobile devices are becoming more and more capable we tried to envision how any power user could generate business intelligence insights based only on his &lt;strong&gt;iPad&lt;/strong&gt;, assuming availability of any of an array of popular enterprise technologies, and relying as little as possible on any IT intervention for his &lt;a target="_blank" title="self service business intelligence" href="http://blogs.forrester.com/boris_evelson/12-06-12-self_service_bi"&gt;self service BI&lt;/a&gt; journey to be a success.&lt;/p&gt;
&lt;p&gt;Such a solution would enable anyone in the organization with an iPad, to be able to access LOB data, stored for instance in a &lt;strong&gt;SharePoint&lt;/strong&gt; library, or a &lt;strong&gt;SQL Server&lt;/strong&gt; database, or a &lt;strong&gt;Reporting Services&lt;/strong&gt; report, even an &lt;strong&gt;Analysis Services&lt;/strong&gt; cube, without the hassle of going through any additional server side setup or configuration. The premise is simple, if the user has clearance, then he should be able to &lt;strong&gt;access enterprise data from the iPad, no excuses.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Additionally, this solution would allow him to &lt;strong&gt;filter &amp;amp; pivot&lt;/strong&gt; that information, customizing the way it&amp;rsquo;s presented, allowing &lt;strong&gt;charting&lt;/strong&gt; options, and composing all views in meaningful &lt;strong&gt;dashboards&lt;/strong&gt;, that he could share. Since that authoring experience would be completely based on the iPad, all the interactions of the process would have to accommodate to a gesture based experience, so it should be a tap and drag driven interaction. The goal would be to provide&lt;strong&gt; the most simple, and easy to use user experience possible&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So we&amp;rsquo;ve been working hard to make that vision a reality, and we are very pleased to announce that the result of that effort is already available for download. We call it &lt;a target="_blank" title="ReportPlus: Mobile Business Intelligence Dashboards" href="http://pro.reportplus.com"&gt;&lt;strong&gt;ReportPlus&lt;/strong&gt;&lt;/a&gt;, you can check it out in the &lt;a title="ReportPlus: Mobile Business Intelligence Dashboards" href="http://pro.reportplus.com"&gt;iTunes app store&lt;/a&gt;.&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://media.infragistics.com/community/images/craigs/blog/2012/reportplus-logo.png" alt="ReportPlus: Business Intelligence Dashboards" height="69" width="350" /&gt;&lt;/p&gt;
&lt;p&gt;For more information, check this &lt;a target="_blank" title="ReportPlus: Mobile Business Intelligence Dashboards" href="http://youtu.be/28ntjGQMg4Q"&gt;ReportPlus Introductory video&lt;/a&gt;, and &lt;a title="Craig&amp;#39;s post on ReportPlus" href="http://www.infragistics.com/community/blogs/craig_shoemaker/archive/2012/09/19/ipad-you-enterprise-reporting.aspx"&gt;Craig&amp;#39;s post on the subject&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description></item><item><title> jQuery Mobile Controls by Infragistics</title><link>http://community.infragistics.com/blogs/damyan_petev/archive/2012/05/18/infragistics-jquery-mobile-controls.aspx</link><pubDate>Fri, 18 May 2012 14:33:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:351478</guid><dc:creator>dpetev</dc:creator><description>&lt;p&gt;With the &lt;a target="_blank" href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx"&gt;jQuery product&lt;/a&gt; Infragistics envisioned business intelligence and data visualization across a range of platforms, not just one &amp;ndash; more like every single one of them. Built on popular and largely supported HTML5 and jQuery UI and striving to provide a comprehensive toolset for development of performant and stylish applications that are to run on every device regardless of the OS. On top of that &amp;lsquo;mobile&amp;#39; was a subtle, yet dominant theme across our product line with the latest release. Touch support and metro themes everywhere! But there&amp;rsquo;s more to it &amp;ndash; the jQuery UI is awesome and will run on just about any modern browser, yet it was not specifically designed for mobile devices, not until recently anyway! &lt;a title="jQuery Mobile: Touch-Optimized Web Framework for Smartphones &amp;amp; Tablets" href="http://jquerymobile.com/" target="_blank"&gt;jQuery&amp;rsquo;s Mobile framework&lt;/a&gt; is-&amp;nbsp; still relatively fresh, but it is just what you might need &amp;ndash; it&amp;rsquo;s touch optimized, it&amp;rsquo;s compatible with with most smartphones and tablets and other frameworks(like PhoneGap). It is designed to be lightweight and its UI controls designed for pocket-size pages and touch, but it&amp;rsquo;s not limited to that, as mobile pages will scale to the screen so it would work and look just as good on a bigger tablet and even a desktop(check out their &lt;a title="jQuery Mobile Demos and Docs" href="http://jquerymobile.com/demos/1.1.0/" target="_blank"&gt;demos&lt;/a&gt; using nothing but the framework). As with JQuery UI, it&amp;rsquo;s a strong cross-platform solution with a different perspective but the same goal &amp;ndash; beautiful, powerful, universal solutions to your app problems. It sounds too good to miss, right? We thought so too&amp;hellip;&lt;/p&gt;
&lt;h1&gt;Enter the Infragistics jQuery Mobile controls &lt;/h1&gt;
&lt;p&gt;With this release besides all controls taking on a touch-friendly nature, our NetAdvantage for jQuery family grew with specialized mobile controls leveraging the jQuery Mobile framework &amp;ndash; the &lt;a title="jQuery Mobile List View" href="http://www.infragistics.com/Control.aspx?id=22952#Overview" target="_blank"&gt;Mobile List View&lt;/a&gt; and a mobile version of the &lt;a title="jQuery Mobile Rating" href="http://www.infragistics.com/Control.aspx?id=22954#Overview" target="_blank"&gt;Rating&lt;/a&gt;. As explained, with them the focus is on mobile-centric and gesture-friendly UI. That means optimizations for mobile devices for stuff like better content placement and some specific interactions along with touch support &amp;ndash; larger UI elements to interact with and specialized events like tap hold, swipes, etc. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;The List view&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sometimes for small screen devices like smartphone a full-fledged grid control would be somewhat hard to imagine and hardly optimal in terms of productivity. It&amp;rsquo;s why mobile design, while trying to fit as much functionality in a limited space as possible, must not clutter or expect to fit everything in one page. This is why the mobile framework provides AJAX based navigation between pages (and by pages I mean their mobile version and multiples can very well exist in one html file). This is also where a control such as the list comes in play &amp;ndash; think of it as the mobile version of the grid type control &amp;ndash; it fits the environment well, it&amp;rsquo;s easy to interact with, it can hold a lot of data and it can be hierarchical! The igListView is a widget that implements a hierarchical (nested) mobile list. Defining can be done in both in the well-known JavaScript/jQuery or using our ASP.NET (MVC) helpers. There&amp;rsquo;s also a third method that is also the default method for the mobile framework &amp;ndash; a pure markup definition that also has some plus sides. Settings are made via the HTML &amp;ldquo;data-*&amp;rdquo; attributes that are mostly for data storage and ignored by browsers when interpreting UI. So for a list you can simple define the standard UL and LI elements and if for some reason jQuery scripts fail to load or execute the browser would still have valid UI to render.&lt;/p&gt;
&lt;p&gt;Now that approach wouldn&amp;rsquo;t be very appropriate if you need some serious amount of data and the Infragistics Mobile ListView comes with a &lt;span style="text-decoration:underline;"&gt;major data support enhancements&lt;/span&gt;, one of which is &lt;strong&gt;templating&lt;/strong&gt;. That means not just controlling the markup of each record but also defining a single UL-LI element and point the widget to data and it will template it appropriately. The other major additions to data handling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Search filtering with the added option of presets&lt;/li&gt;
&lt;li&gt;Using the Infragistics Data Source means the controls can bind to a variety of sources&lt;/li&gt;
&lt;li&gt;Sorting, sorting presets and groups separated with list deviders.&lt;/li&gt;
&lt;li&gt;Load on Demand capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img title="Infragistics jQuery Mobile List View with grouping and iOS theme in the default c swatch." alt="Infragistics jQuery Mobile List View with grouping and iOS theme in the default c swatch." src="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/igListView_grouping_ios_default-c-swatch.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;The Rating&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The mobile version of the rating control designed for touch means accuracy levels are restricted to whole numbers (or alternatively rounded to halves when the control is in read-only mode). The widget offers settings to control its layout along with getting and setting value, vote count and a changed value event along with the framework&amp;rsquo;s touch-oriented ones. And as expected you can always tweak the items the rating is using to some other shape or color.&lt;/p&gt;
&lt;p&gt;&lt;img title="Infragistics jQuery Mobile Rating with iOS theme in a swatch." alt="Infragistics jQuery Mobile Rating with iOS theme in a swatch." src="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/igRating_ios.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Style&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As you can tell by the screenshots above we&amp;rsquo;ve designed a beautiful iOS style theme for our mobile controls. And for any of you familiar with jQuery UI you&amp;rsquo;d expect a common and powerful themeing framework to be in play for mobile as well &amp;ndash; and there is! Our theme will style all default &lt;a href="http://www.infragistics.com"&gt;UI components&lt;/a&gt; as well and it can be replaced with one of your own. And yes, there&amp;rsquo;s a &lt;a title="ThemeRoller for jQuery Mobile" href="http://jquerymobile.com/themeroller/" target="_blank"&gt;ThemeRoller for jQuery Mobile&lt;/a&gt;! It&amp;rsquo;s very easy to use &amp;ndash; all mobile themes have 3 swatches that are usually used for default layouts and actions. Just like that our iOS theme has 3 swatches &amp;ndash; a light C (default) swatch seen above with the list, darker B and the A swatch (the one with the exquisite fabric background above). I&amp;rsquo;ve made a theme myself for what was like 10 min in a metro-style attempt and I&amp;rsquo;ve included it in the demo just in case someone likes it:&lt;/p&gt;
&lt;p&gt;&lt;img title="Infragistics jQuery Mobile List View with grouping and ThemeRoller built metro style theme." alt="Infragistics jQuery Mobile List View with grouping and ThemeRoller built metro style theme." src="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/igListView_grouping_metro.png" /&gt;&lt;/p&gt;
&lt;h1&gt;A Mobile App&lt;/h1&gt;
&lt;p&gt;Let&amp;rsquo;s see how easy it can be to create a mobile app that is functional and stylish. We&amp;rsquo;ll stay on the wave of new technology for the demo and create this app using the new mobile template in ASP.NET MVC 4! What would that do is it would lay all the basic layout of the app for you &amp;ndash; referencing all jQuery scripts (mobile included) and styles, bundling and minifying them. It would also render your Views in the mobile version of a page by marking the content DIV with &lt;em&gt;data-role=&amp;quot;page&amp;quot;.&lt;/em&gt;&amp;nbsp; So all left to do is add the Infragistics Mobile Loader ask for the control you need and define it. For this demo I&amp;rsquo;ll use Northwind again with two actions in the controller returning JSON serialized parts of it for an somewhat odd-styled manual load on demand scenario for the details of each list item (again this is different from the load on demand feature the igListView has which allows the end-user to request another portion of data to be loaded for his current list). Here&amp;rsquo;s the snippet for the list:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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:bb1f488b-e2f2-4a8f-903d-4fb953931604" 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;white-space:nowrap;"&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;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$.ig.loader({&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scriptPath: &lt;span style="color:#800000;"&gt;&amp;quot;../../Scripts/Infragistics-mobile/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;&amp;nbsp;&amp;nbsp;cssPath: &lt;span style="color:#800000;"&gt;&amp;quot;../../Content/Infragistics-mobile/css/&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;resources: &lt;span style="color:#800000;"&gt;&amp;quot;igmList.Filtering.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;theme: &lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:#ffff00;color:#800000;"&gt;@&lt;/span&gt;ViewBag.Theme&lt;span style="color:#800000;"&gt;&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;&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;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;ul&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;actionFedList&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:#ff0000;"&gt;data-role&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;iglistview&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:#ff0000;"&gt;data-auto-generate-layouts&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;false&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;data-data-source&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;/Home/Customers&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:#ff0000;"&gt;data-bindings-header-key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ContactName&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;data-bindings-primary-key&lt;/span&gt;&lt;span style="color:#0000ff;"&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;&lt;span style="color:#ff0000;"&gt;data-bindings-text-key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Country&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:#ff0000;"&gt;data-auto-generate-layouts&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;false&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;data-initial-data-bind-depth&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;0&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:#ff0000;"&gt;data-bindings-details-title-key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;CustomerID&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:#ff0000;"&gt;data-sorting&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;true&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;data-sorting-type&lt;/span&gt;&lt;span style="color:#0000ff;"&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;span style="color:#ff0000;"&gt;data-sorting-auto-generate-sort-presets&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;false&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;data-sorting-presets&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;#39;[ {&amp;quot;text&amp;quot;:&amp;quot;Customer ID&amp;quot;,&amp;quot;sortedFields&amp;quot;:[ {&amp;quot;fieldName&amp;quot;:&amp;quot;CustomerID&amp;quot;,&amp;quot;direction&amp;quot;:&amp;quot;asc&amp;quot;} ]}, {&amp;quot;text&amp;quot;:&amp;quot;Contact Name&amp;quot;,&amp;quot;sortedFields&amp;quot;:[ {&amp;quot;fieldName&amp;quot;:&amp;quot;ContactName&amp;quot;,&amp;quot;direction&amp;quot;:&amp;quot;asc&amp;quot;} ]}, {&amp;quot;text&amp;quot;:&amp;quot;Country&amp;quot;,&amp;quot;showGrouping&amp;quot;:&amp;quot;true&amp;quot;,&amp;quot;sortedFields&amp;quot;:[ {&amp;quot;fieldName&amp;quot;:&amp;quot;Country&amp;quot;,&amp;quot;direction&amp;quot;:&amp;quot;asc&amp;quot;} ]} ]&amp;#39;&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;span style="color:#ff0000;"&gt;data-filtering&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;true&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:#ff0000;"&gt;data-filtering-type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;local&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;data-filtering-search-bar-field-name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ContactName,Country&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;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;li&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&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;&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;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;ul&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;data-role&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;childLayout&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;&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;&lt;span style="color:#ff0000;"&gt;data-auto-generate-layouts&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;false&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;data-data-source&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;/Home/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;&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;span style="color:#ff0000;"&gt;data-bindings&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;#39;{&amp;quot;customerId&amp;quot;:&amp;quot;CustomerID&amp;quot;}&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;&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:#ff0000;"&gt;data-inset&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;true&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;data-generate-compact-jsonresponse&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;false&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;data-bindings-count-key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Freight&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;data-key&lt;/span&gt;&lt;span style="color:#0000ff;"&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;&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;&lt;span style="color:#ff0000;"&gt;data-bindings-header-key&lt;/span&gt;&lt;span style="color:#0000ff;"&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;&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;span style="color:#ff0000;"&gt;data-bindings-text-key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ShipName&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;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;&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:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;ul&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&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;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;li&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&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;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;ul&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;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note i have my theme set using the MVC dynamic ViewBag and I choose (and let users choose) a theme and call the controller action with that theme. Since I can&amp;rsquo;t put comments I&amp;rsquo;ve grouped code to be easier to see which part does what. The magic combo here is &lt;em&gt;data-role=&amp;quot;iglistview&amp;rdquo;. &lt;/em&gt;Also note the data source can be a link (it&amp;rsquo;s the &lt;a title="Infragistics jQuery Data Source Online Samples" href="http://samples.infragistics.com/jquery/data-source" target="_blank"&gt;igDataSource&lt;/a&gt; after all) so local JSON, actions results, services, XML, oData and so on &amp;ndash; check! Defining header and text key are the properties in your data to be displayed for each record, the initial bind depth set to 0 will let the list know we have provided just the data for the main list (otherwise the list will ignore those layouts since child data is not loaded). Sorting and filtering are truly easy to enable with just a property and you can also customize them with presets and in them setting &lt;em&gt;&amp;quot;showGrouping&amp;quot;:&amp;quot;true &lt;/em&gt;causes the list to group the sorted results just like the screeenshots above. And yes you can define custom sorting functions and group comparers if you so desire, but for our basic demo there&amp;rsquo;s no need. In the child layout we again set the source to a actiong link and the &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;data-bindings=&amp;#39;{&amp;quot;customerId&amp;quot;:&amp;quot;CustomerID&amp;quot;}&amp;#39;&lt;/em&gt; &lt;span style="text-decoration:underline;"&gt;property instructs the list to include this as part of the links query so we can send the data for the right customer and the result:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title="Infragistics jQuery Mobile List View auto generated details sub page(default b swatch)" alt="Infragistics jQuery Mobile List View auto generated details sub page(default b swatch)" src="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/igListView_ios_details.png" /&gt;&lt;/p&gt;
&lt;p&gt;This sub-page is all auto-generated for you, navigated to using AJAX, back button and history maintained!&lt;/p&gt;
&lt;p&gt;Adding the rating is just as easy, again either through markup, helpers or initializing with script. Also as we mentioned you have the ability to now develop against specialized touch events so you can provide that little extra interaction to mobile users &amp;ndash; we would use the long tap gesture to reset the rating and also handle the changed event:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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:b161fe58-6efc-4cae-b907-b662c7f13fe7" 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;white-space:nowrap;"&gt;
&lt;li&gt;&lt;span style="background:#ffff00;"&gt;@&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Infragistics.Web.Mvc&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&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;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;//load the resources:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$.ig.loader({&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;scriptPath: &lt;span style="color:#800000;"&gt;&amp;quot;../../Scripts/Infragistics-mobile/js/&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;cssPath: &lt;span style="color:#800000;"&gt;&amp;quot;../../Content/Infragistics-mobile/css/&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;resources: &lt;span style="color:#800000;"&gt;&amp;quot;igmRating&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;span style="color:#006400;"&gt;// show the changed value&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(document).delegate(&lt;span style="color:#800000;"&gt;&amp;quot;#rating&amp;quot;&lt;/span&gt;, &lt;span style="color:#800000;"&gt;&amp;quot;igratingvaluechange&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; voteCount = $(&lt;span style="color:#800000;"&gt;&amp;quot;.selector&amp;quot;&lt;/span&gt;).igRating(&lt;span style="color:#800000;"&gt;&amp;quot;option&amp;quot;&lt;/span&gt;, &lt;span style="color:#800000;"&gt;&amp;quot;voteCount&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:#800000;"&gt;&amp;quot;#ratingValue&amp;quot;&lt;/span&gt;).text(&lt;span style="color:#800000;"&gt;&amp;quot;Rated: &amp;quot;&lt;/span&gt; + ui.value + &lt;span style="color:#800000;"&gt;&amp;quot; star(s)!&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;span style="color:#006400;"&gt;// reset the rating on tap hol&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(document).bind(&lt;span style="color:#800000;"&gt;&amp;quot;#rating&amp;quot;&lt;/span&gt;, &lt;span style="color:#800000;"&gt;&amp;quot;taphold&amp;quot;&lt;/span&gt;, &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;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!Modernizr.touch) {&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:#0000ff;"&gt;return&lt;/span&gt; &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;}&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:#800000;"&gt;&amp;quot;#rating&amp;quot;&lt;/span&gt;).igRating(&lt;span style="color:#800000;"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;, 0);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}); &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:#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;h2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#f3f3f3;"&gt;some rating&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;/li&gt;
&lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;P&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt; Tap to set value, tap and hold to reset (zero). &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;P&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:#006400;"&gt;&amp;lt;!-- Markup defined --&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;div&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;rating&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;data-role&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;igrating&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;data-value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;3&amp;quot;&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;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&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;p&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ratingValue&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;p&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&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;p&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt; Read-only Rating defined with the MVC helper:&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;p&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&lt;span style="background:#ffff00;"&gt;@(&lt;/span&gt;Html.InfragisticsMobile().Rating()&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;.Value(4)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ReadOnly(&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;.Render()&lt;/li&gt;
&lt;li&gt;&lt;span style="background:#ffff00;"&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can get and set rating&amp;rsquo;s value and vote count at all times and the changed event offers both the new and old values along with regular references to owner and so on. Read-only mode rating converts to a smaller form (no longer need to be big enough to be touched):&lt;/p&gt;
&lt;p&gt;&lt;img title="Infragistics jQuery Mobile Rating with iOS theme in default c swatch and read-only version." alt="Infragistics jQuery Mobile Rating with iOS theme in default c swatch and read-only version." src="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/igRating_readonly_ios_default_swatch.png" /&gt;&lt;/p&gt;
&lt;p&gt;And, lastly, you can always override the default images or their locations to change the appearance of the control to match your theme. Below I&amp;rsquo;ve change the non-iOS default stars for the rating form yellow to blue to match my theme&amp;rsquo;s looks:&lt;/p&gt;
&lt;p&gt;&lt;img title="Infragistics jQuery Mobile Rating with iOS theme in ThemeRoller built metro style theme and customized items." alt="Infragistics jQuery Mobile Rating with iOS theme in ThemeRoller built metro style theme and customized items." src="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/igRating_metro.png" /&gt;&lt;/p&gt;
&lt;h1&gt;Wrapping Up&lt;/h1&gt;
&lt;p&gt;If you want to build a mobile friendly app the jQuery Mobile framework is an excellent choice and we are offering that extra functionality for you to take advantage of &amp;ndash; hierarchical list with templating, advanced filtering, sorting, grouping and impressive load on demand features and support for a wide array of data sources and a beautiful mobile rating optimized for touch interactions to truly score you those five stars! And there&amp;rsquo;s a bonus &amp;ndash; everything is optimized for mobile devices, but it looks and works perfectly good on a desktop as well!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I strongly recommend to take a closer look into jQuery Mobile and check out our&lt;span style="text-decoration:underline;"&gt; &lt;/span&gt;&lt;/em&gt;&lt;a title="NetAdvantage for jQuery Online Samples" href="http://samples.infragistics.com/jquery" target="_blank"&gt;&lt;em&gt;awesome samples&lt;/em&gt;&lt;/a&gt;&lt;em&gt; (there are codes in there for you to scan and try them on you mobile device too!). Also you can download a fully functional unlimited trial of &lt;/em&gt;&lt;a title="The best HTML5 applications call for brilliant Data Visualization and jaw-dropping performance!" href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Overview" target="_blank"&gt;&lt;em&gt;NetAdvantage for jQuery&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and the &lt;/em&gt;&lt;a title="Infragistics jQuery Mobile List view and Rating ASP.NET MVC 4 Demo app." href="http://media.infragistics.com/community/Release/12.1/jQuery/Mobile_Controls/jQueryMobile_List_Rating.zip"&gt;&lt;em&gt;Demo Project for this Blog&lt;/em&gt;&lt;/a&gt;&lt;em&gt; &amp;ndash; an APS.NET MVC 4 mobile application you&amp;rsquo;ve seen bits from above and should definitely try!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Follow us on Twitter &lt;/em&gt;&lt;a title="That would be me" href="https://twitter.com/DamyanPetev" target="_blank"&gt;&lt;em&gt;@DamyanPetev&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &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 join the competition 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;/p&gt;</description></item><item><title>Combining different data sources in jQuery: Fun with the Infragistics Mashup Data Source</title><link>http://community.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://community.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><item><title>Getting Started with igGrid, OData, and WCF Data Services</title><link>http://community.infragistics.com/blogs/engineering/archive/2011/07/28/getting-started-with-iggrid-odata-and-wcf-data-services.aspx</link><pubDate>Thu, 28 Jul 2011 18:54:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:296123</guid><dc:creator>amarisi</dc:creator><description>&lt;p&gt;The igGrid is a client-side data grid with paging, filtering, and sorting functionality. It can bind to local data including XML, JSON, JavaScript arrays, HTML tables and remote data returned through web services.&lt;/p&gt;
&lt;p&gt;The most seamless way to bind the igGrid to remote data is to use it in conjunction with OData. OData, or Open Data Protocol, operates over HTTP and provides a means of querying and updating data in JSON and AtomPub formats through a set of common URL conventions. This means that you can provide the grid with a URL to the OData service, set one property, and all of the paging, filtering, and sorting can be done remotely on the server without any additional configuration.&lt;/p&gt;
&lt;p&gt;This article shows how to setup a client-side jQuery grid with remote paging, filtering, and sorting by setting up a WCF Data Service in an ASP.NET Web Application and setting two options on the igGrid.&lt;/p&gt;
&lt;p&gt;1. Open Visual Studio and create a new ASP.NET Empty Web Application called &amp;lsquo;igDataSourceWCFService&amp;rsquo;:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: this is a plain old ASP.NET Web Application &amp;ndash; this is not ASP.NET MVC. NetAdvantage for jQuery is &amp;lsquo;server agnostic&amp;rsquo;, meaning it does not rely on any specific server-side architecture. While the product ships with built-in support for ASP.NET MVC, this server framework is not required to use the rich client-side functionality.&lt;/p&gt;
&lt;p&gt;&lt;img height="231" width="602" src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_webapp.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;2. Add an App_Data folder to your project and add the AdventureWorks database into that folder:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; To obtain the AdventureWorks database, download it &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/37109"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_proj1.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;3. Next, add an ADO.NET Entity Data Model named AdventureWorksEntities.edmx to the project and point it to the AdventureWorks database:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_addedm.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img height="285" width="556" src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_edmdb.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;4. Choose the Product table to be included in the Entity Data Model:&lt;/p&gt;
&lt;p&gt;&lt;img height="497" width="561" src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_edmtbl.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;5. Next add a WCF Data Service to the project named &amp;lsquo;AdventureWorksService.svc&amp;rsquo;:&lt;/p&gt;
&lt;p&gt;&lt;img height="337" width="601" src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_addwcfds.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;6. At this point your project should look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_proj2.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;7. Next, open the &amp;lsquo;AdventureWorksDataService&amp;rsquo;. This class derives from DataService&amp;lt;T&amp;gt; where T has not yet been defined. Specify the type of your Entity Data Model here:&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter"&gt;public class AdventureWorksDataService : DataService&amp;lt;AdventureWorksLT2008_DataEntities&amp;gt;&lt;/pre&gt;
&lt;p&gt;8. Next, enable access to the Products table through the Data Service by adding this line of code within the InitializeService method:&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter"&gt;public static void InitializeService(DataServiceConfiguration config
{
	config.SetEntitySetAccessRule(&amp;quot;Products&amp;quot;, EntitySetRights.AllRead);
	config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
}&lt;/pre&gt;
&lt;p&gt;9. WCF Data Services has native support for the Atom format. To enable JSON formatted data, you should download the &lt;a href="http://archive.msdn.microsoft.com/DataServicesJSONP"&gt;JSONPSupportBehavior&lt;/a&gt; code file and include it in your application.&lt;/p&gt;
&lt;p&gt;10. Once the JSONPSupportBehavior.cs file is included in your application, make sure to change the namespace to match the namespace used in your application. Also, add the JSONPSupportBehavior attribute to your AdventureWorksDataService class:&lt;/p&gt;
&lt;pre name="code" class="c#:nogutter"&gt;[JSONPSupportBehavior]
public class AdventureWorksDataService : DataService&amp;lt;AdventureWorksLT2008_DataEntities&amp;gt;&lt;/pre&gt;
&lt;p&gt;11. At this point, you can run the Web Application and access the data of the service so now it&amp;rsquo;s time to setup the igGrid.&lt;/p&gt;
&lt;p&gt;12. You will need the NetAdvantage for jQuery combined and minified script file, ig.ui.min.js, which comes with the product. In addition, you will need the jQuery, jQuery UI, and jQuery templates scripts to run the sample. This &lt;a href="http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=Deployment_Guide_JavaScript_Resouces.html"&gt;help&lt;/a&gt; article discusses referencing the required scripts and where the combined and minified scripts can be found.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: You can download the full or trial product &lt;a href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Downloads"&gt;here&lt;/a&gt;. The jQuery templates script can be obtained &lt;a href="http://api.jquery.com/category/plugins/templates/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;13. You should setup a scripts directory in your project and copy the JavaScript files into this folder. &lt;/p&gt;
&lt;p&gt;14. Setup a styles directory and add the Infragistics themes directory to this folder. For more information on working with the jQuery themes for the igGrid, see &lt;a href="http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=igGrid_Styling_and_Theming.html"&gt;this help topic&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;15. Next you can setup the sample page. You are going to add a new html page to the application and call it &amp;lsquo;default.htm&amp;rsquo;. Once that is done your project will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_proj3.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;16. Open the default.htm file and include CSS links and script tags for the jQuery resources:&lt;/p&gt;
&lt;pre name="code" class="html:nogutter"&gt;&amp;lt;head&amp;gt;
    &amp;lt;link href=&amp;quot;styles/themes/min/ig/jquery.ui.custom.min.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;link href=&amp;quot;styles/themes/base/ig.ui.min.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
 
    &amp;lt;script src=&amp;quot;scripts/jquery.min.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;scripts/jquery-ui.min.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;scripts/jquery.tmpl.min.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;scripts/ig.ui.min.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;p&gt;17. Next, add a TABLE element to the body of the HTML which will serve as the base element for the grid:&lt;/p&gt;
&lt;pre name="code" class="html:nogutter"&gt;&amp;lt;body&amp;gt;
	&amp;lt;table id=&amp;#39;tableProducts&amp;#39;&amp;gt;&amp;lt;/table&amp;gt;
&amp;lt;/body&amp;gt;&lt;/pre&gt;
&lt;p&gt;18. Add another script tag to the HEAD and instantiate an igGrid and define columns:&lt;/p&gt;
&lt;pre name="code" class="js:nogutter"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
        
$(window).load(function () {
	$(&amp;#39;#tableProducts&amp;#39;).igGrid({
		height: &amp;#39;500px&amp;#39;,
		width: &amp;#39;800px&amp;#39;,
		autoGenerateColumns: false,
		columns: [
			{ headerText: &amp;#39;ID&amp;#39;, key: &amp;#39;ProductID&amp;#39;, dataType: &amp;#39;number&amp;#39; },                
			{ headerText: &amp;#39;Name&amp;#39;, key: &amp;#39;Name&amp;#39;, dataType: &amp;#39;string&amp;#39; },                
			{ headerText: &amp;#39;Number&amp;#39;, key: &amp;#39;ProductNumber&amp;#39;, dataType: &amp;#39;string&amp;#39; },                
			{ headerText: &amp;#39;Cost&amp;#39;, key: &amp;#39;StandardCost&amp;#39;, dataType: &amp;#39;number&amp;#39;, format: &amp;#39;currency&amp;#39;}
		]
	});
});
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;19. To bind the igGrid to data, two options should be set to define the URL for the data and the responseDataKey:&lt;/p&gt;
&lt;p&gt;Note: The value &lt;a href="http://www.odata.org/developers/protocols/json-format#RepresentingCollectionsOfEntries"&gt;d.results&lt;/a&gt; is a standard response key for JSON data coming from a &amp;lsquo;V2&amp;rsquo; OData service&lt;/p&gt;
&lt;pre name="code" class="js:nogutter"&gt;responseDataKey: &amp;#39;d.results&amp;#39;,
dataSource: &amp;#39;AdventureWorksDataService.svc/Products?$format=json&amp;#39;,&lt;/pre&gt;
&lt;p&gt;20. Finally, enable the features of the grid including the option to make them operate remotely:&lt;/p&gt;
&lt;pre name="code" class="js:nogutter"&gt;features: [
	{
		name: &amp;#39;Selection&amp;#39;,
		mode: &amp;#39;row&amp;#39;,
		multipleSelection: true
	},
	{
		name: &amp;#39;Paging&amp;#39;,
		type: &amp;#39;remote&amp;#39;,
		pageSize: 15
	},
	{
		name: &amp;#39;Sorting&amp;#39;,
		type: &amp;#39;remote&amp;#39;
	},
	{
		name: &amp;#39;Filtering&amp;#39;,
		type: &amp;#39;remote&amp;#39;,
		mode: &amp;#39;advanced&amp;#39;                                    
	}
]&lt;/pre&gt;
&lt;p&gt;Run the sample and you will see the igGrid rendered. Combined with OData, the grid can filter, sort, and page data remotely by supplying a single URL as the datasource.&lt;/p&gt;
&lt;p&gt;&lt;img height="384" width="614" src="http://dl.infragistics.com/community/images/aaronm/blog/2011-07-28/gdod_sample.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dl.infragistics.com/community/jquery/codesamples/aaronm/2011-07-28/igGridOData.zip"&gt;Download Sample&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The AdventureWorks database and NetAdvantage for jQuery resources are not included in the sample. Visit these links to obtain the software:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/37109"&gt;AdventureWorks Database&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Downloads"&gt;NetAdvantage for jQuery&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>