<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.infragistics.com/community/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>Musings from Rob Richard</title><link>http://www.infragistics.com/community/blogs/robert_richard/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP3 (Build: 36.8414)</generator><item><title>jQueryMobile 1.1.0 and the listview</title><link>http://www.infragistics.com/community/blogs/robert_richard/archive/2012/04/23/jquerymobile-1-1-0-and-the-listview.aspx</link><pubDate>Mon, 23 Apr 2012 16:07:07 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:346174</guid><dc:creator>DoctorRob</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.infragistics.com/community/blogs/robert_richard/rsscomments.aspx?PostID=346174</wfw:commentRss><comments>http://www.infragistics.com/community/blogs/robert_richard/archive/2012/04/23/jquerymobile-1-1-0-and-the-listview.aspx#comments</comments><description>&lt;h3&gt;Introduction&lt;/h3&gt;  &lt;p&gt;So jQueryMobile 1.1.0 has finally been released; that’s the good news. The bad news is that some of the issues I complained about in my last post are still present in this version. So let’s just call 1.1.0 a work-in-progress. That being said, let’s investigate jQueryMobile a little further. Let’s begin with one of the most basic elements that you will most undoubtedly use in most – if not all – of your mobile apps: the &lt;b&gt;listview &lt;/b&gt;(&lt;a href="http://jquerymobile.com/demos/1.1.0/docs/lists/index.html"&gt;http://jquerymobile.com/demos/1.1.0/docs/lists/index.html&lt;/a&gt;).&lt;/p&gt;  &lt;h3&gt;The listview&lt;/h3&gt;  &lt;p&gt;The listview is perhaps the most common element that is used in mobile apps. It allows us as developers to create a straight forward, intuitive navigational interface. jQueryMobile’s implementation of the listview is pretty good, and offers a lot of different options, and themes very well.&lt;/p&gt;  &lt;h4&gt;Basic listview&lt;/h4&gt;  &lt;p&gt;Let’s say you simply want to present a list of items nicely on a view: easily done using just the basic listview. The code below shows a straight-forward list which displays countries.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;data-role&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;listview&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;France&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Great Britain&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Finland&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Norway&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;United States&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image002_5F00_65E7C255.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image002_5F00_thumb_5F00_378E3CA8.jpg" width="244" height="203" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s get a little fancier and add the county’s flag to the list. Easily done, by simply adding the flag image and now giving the element a class of &amp;quot;ui-li-icon&amp;quot;…&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;data-role&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;listview&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/gf.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;France&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;France&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/de.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Germany&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/gb.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Great Britain&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Great Britain&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/fi.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Finland&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Finland&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/sj.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Norway&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Norway&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/us.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;United States&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;United States&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image004_5F00_372209B3.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image004" border="0" alt="clip_image004" src="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image004_5F00_thumb_5F00_36B5D6BE.jpg" width="244" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now that we have an aesthetically pleasing list, let’s make it a navigation-type list, where for example tapping or clicking on a country takes us to another page / view.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;data-role&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;listview&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/FR&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/gf.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;France&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;France&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/DE&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/de.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Germany&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/GB&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/gb.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Great Britain&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Great Britain&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/FI&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/fi.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Finland&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Finland&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/NO&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/sj.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Norway&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Norway&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/US&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/us.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;United States&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;United States&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;&lt;a href="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image005_5F00_1D4DD384.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image005" border="0" alt="clip_image005" src="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image005_5F00_thumb_5F00_558C4A9C.png" width="244" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now we have a navigational list to take us to detail pages based on the country selected. There’s one more basic feature to add which jQueryMobile implements very nicely: the Search/Filter bar. So in our example, let’s say we have all the countries of the world listed here, all 180+. Instead of scroll down through the items, we simply want to start typing the first few letters of the country name and let the list show only those matching items. Amazingly enough, this in only a property setting on our listview - data-filter=&amp;quot;true&amp;quot;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;data-role&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;listview&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;data-filter&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/FR&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/gf.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;France&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;France&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/DE&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/de.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Germany&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/GB&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/gb.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Great Britain&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Great Britain&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/FI&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/fi.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Finland&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Finland&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/NO&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/sj.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Norway&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Norway&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://localhost:30155/country/details/US&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;images/us.png&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;United States&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ui-li-icon&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;United States&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;




&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image006_5F00_02350476.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image006" border="0" alt="clip_image006" src="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/clip_5F00_image006_5F00_thumb_5F00_67F49B51.png" width="244" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nicely done, jQueryMobile! Next time we’ll start on some of the basic form elements such as buttons, textboxes, and the like. Until then, happy coding…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.infragistics.com/community/aggbug.aspx?PostID=346174" width="1" height="1"&gt;</description></item><item><title>jQueryMobile 1.1.0 and MVC4</title><link>http://www.infragistics.com/community/blogs/robert_richard/archive/2012/03/09/jquerymobile-1-1-0-and-mvc4.aspx</link><pubDate>Fri, 09 Mar 2012 20:31:31 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:337417</guid><dc:creator>DoctorRob</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.infragistics.com/community/blogs/robert_richard/rsscomments.aspx?PostID=337417</wfw:commentRss><comments>http://www.infragistics.com/community/blogs/robert_richard/archive/2012/03/09/jquerymobile-1-1-0-and-mvc4.aspx#comments</comments><description>&lt;h3&gt;Introduction&lt;/h3&gt;  &lt;p&gt;I’ve been working on a project recently targeting mobile devices and have been using the latest version of jQueryMobile, 1.1.0 (Release Candidate 1 as of Feb 28, 2012 - &lt;a href="http://jquerymobile.com/blog/2012/02/28/announcing-jquery-mobile-1-1-0-rc1/"&gt;http://jquerymobile.com/blog/2012/02/28/announcing-jquery-mobile-1-1-0-rc1/&lt;/a&gt;). This new version offers a number of enhancements on the jQueryMobile front (and introduces a few new issues, which will hopefully be worked out before being released as production). The great thing about advances in jQueryMobile is that it ties directly in to Microsoft’s plans for MVC 4 (also currently in Beta as of September, 2011) and their new mobile project template (see &lt;a href="http://www.asp.net/whitepapers/mvc4-release-notes#_Toc317096197"&gt;http://www.asp.net/whitepapers/mvc4-release-notes#_Toc317096197&lt;/a&gt;). My next few blog posts will examine jQueryMobile 1.1.0 and how we can leverage some of the tools in our own MVC-based, mobile-targeted applications.&lt;/p&gt;  &lt;h3&gt;Getting Started&lt;/h3&gt;  &lt;p&gt;In getting started with jQueryMobile (“JQM”) 1.1.0, the first thing to note is that it now supports jQuery version 1.7.1 (the previous version of JQM ONLY supports jQuery 1.6.4). Some significant enhancements include improved slider (including a “step” attribute to make sliding easier) and flip switches (fixed the awkwardness of the 1.0 version), the inclusion of a “mini” version of form elements, two new transitions, a navigation search (filter) capability, and a nice AJAX loader design and options, in addition to bug fixes and other enhancements. There is even an enhancement that will allow JQM to play nicely with 3&lt;sup&gt;rd&lt;/sup&gt; party controls (which obviously is of interest to us using Infragistics’ jQuery tools (&lt;a href="http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Overview"&gt;http://www.infragistics.com/dotnet/netadvantage/jquery-controls.aspx#Overview&lt;/a&gt;)!).&lt;/p&gt;  &lt;p&gt;This version of JQM solved a host of issues I had previously (ie, the checkbox control!) and lays the foundation for additional items to be included in the future, both from the JQM team, plugin developers, and other 3&lt;sup&gt;rd&lt;/sup&gt; party control suppliers. Still lurking in the shadows is Android sluggishness, so I’m hoping that the brain trust collaborates on ways to quicken it on Android.&lt;/p&gt;  &lt;h3&gt;The Plan&lt;/h3&gt;  &lt;p&gt;Over the next few blog posts, I will introduce and evaluate the various elements in JQM that are more popular to us as mobile device developers using a development platform. For instance, pages for us are in theory irrelevant since we will be using views. However, touch and form elements are indeed of interest. If popular demand dictates, however, that specific items be addressed, we can certainly spend a blog post or two on those things.&lt;/p&gt;  &lt;h3&gt;What’s Next?&lt;/h3&gt;  &lt;p&gt;Well, let’s start individually by downloading the aforementioned pre-release versions of jQueryMobile and MVC4, install them, and start exploring in preparation of our short series. Until then, happy coding…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.infragistics.com/community/aggbug.aspx?PostID=337417" width="1" height="1"&gt;</description><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/mvc/default.aspx">mvc</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/infragistics/default.aspx">infragistics</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/jquery/default.aspx">jquery</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/jquery+mobile/default.aspx">jquery mobile</category></item><item><title>Using VB.NET Razor markup with the Infragistics jquery grid.</title><link>http://www.infragistics.com/community/blogs/robert_richard/archive/2012/01/13/using-vb-net-razor-markup-with-the-infragistics-jquery-grid.aspx</link><pubDate>Fri, 13 Jan 2012 15:42:37 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:325752</guid><dc:creator>DoctorRob</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.infragistics.com/community/blogs/robert_richard/rsscomments.aspx?PostID=325752</wfw:commentRss><comments>http://www.infragistics.com/community/blogs/robert_richard/archive/2012/01/13/using-vb-net-razor-markup-with-the-infragistics-jquery-grid.aspx#comments</comments><description>&lt;h3&gt;Introduction&lt;/h3&gt;  &lt;p&gt;Recently I had occasion to work with a customer developing an MVC application using VB.NET and the Infragistics JQuery tools – more specifically, the JQGrid. The challenge came when the customer wanted to use the Razor syntax on their views, and implementing the lambda expressions that we use in C# (I almost exclusively use C#) isn’t available in shorthand in VB.NET. This blog posting walks you through building a VB.NET version of this (&lt;a href="http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/09/using-netadvantage-jquery-grid-in-asp-net-mvc.aspx"&gt;http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/09/using-netadvantage-jquery-grid-in-asp-net-mvc.aspx&lt;/a&gt;) C# application.&lt;/p&gt;  &lt;h3&gt;Project setup&lt;/h3&gt;  &lt;p&gt;For the sake of brevity, you can use the same procedure for setting up the project that is found in the previous posting (&lt;a href="http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/09/using-netadvantage-jquery-grid-in-asp-net-mvc.aspx"&gt;http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/09/using-netadvantage-jquery-grid-in-asp-net-mvc.aspx&lt;/a&gt;) entitled “Setting up the project”.&lt;/p&gt;  &lt;h3&gt;Implementing the Model&lt;/h3&gt;  &lt;p&gt;Just as in the original posting, let’s begin with the model. We’ve translated the C# code for the model to VB.NET, as seen below.&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:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:84a8df2d-daca-420c-aade-6f9b9d893ebe" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: vb;"&gt;Public Class BankAccount
    Public Property AccountNumber As Integer
    Public Property AccountName As String
    Public Property AccountDate As DateTime
    Public Property AccountType As String
    Public Property AccountBalance As Decimal
End Class
Public Class AccountModel
    Public Shared Function GetAccountList() As List(Of BankAccount)
        Dim aList As List(Of BankAccount) = New List(Of BankAccount)
        For i As Integer = 1 To 1000
            Dim a As BankAccount = New BankAccount()
 
            With a
                .AccountNumber = i
                .AccountName = &amp;quot;Test&amp;quot; + i.ToString()
                .AccountDate = Today
                .AccountType = &amp;quot;Checking&amp;quot;
                .AccountBalance = 12345678.9
            End With
            aList.Add(a)
        Next
 
        Return aList
    End Function
End Class
&lt;/pre&gt;&lt;/div&gt;

&lt;p style="line-height:normal;margin:0in 0in 0pt;background:white;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;" class="MsoNormal"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;
    
  &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;So we have the same AccountModel with the BankAccount class built into it. The AccoundModel class provides us with the GetAccountList function which generates some “test” BankAccount data.&lt;/p&gt;

&lt;h3&gt;The controller&lt;/h3&gt;

&lt;p&gt;Let’s depart from the previous blog here by going next to the controller class instead. The controller is pretty straight forward. We want to place code that when called by the view, will go and get the account list from the model and then return it. To do that, we will use the following code, making sure to import theInfragistics.Web.Mvc:&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:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:72e128bc-813c-4bdf-adca-477fc985d5ca" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: vb;"&gt;Imports Infragistics.Web.Mvc
Public Class HomeController
    Inherits System.Web.Mvc.Controller
 
    &amp;#39;
    &amp;#39; GET: /Index
 
    Function Index() As ActionResult
        Return View()
    End Function
 
    &amp;lt;GridDataSourceAction()&amp;gt;
    &amp;lt;ActionName(&amp;quot;GetAccountList&amp;quot;)&amp;gt;
    Function GetAccountList() As ActionResult
        Return View(Mvc3WebAppVB.AccountModel.GetAccountList().AsQueryable())
    End Function
End Class
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;The view&lt;/h3&gt;

&lt;p&gt;Now for the view – the focus of this posting. As you can see in the previous posting, we use the Razor syntax. For certain collections (features, columns, etc.) in the JQGrid, we can use lambda expressions in C# to configure the grid. However, VB.NET doesn’t support the shorthand lambda expression. Fortunately, we can emulate the C# equivalent by using Function() (&lt;a href="http://msdn.microsoft.com/en-us/library/bb531253.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb531253.aspx&lt;/a&gt;). Therefore, something in C# that looks like this:&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:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:10c976fd-a7e7-4337-b98e-0ddaabf647b4" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: c#;"&gt;.Columns(column =&amp;gt;
{
    column.For(x =&amp;gt; x.AccountNumber).DataType(&amp;quot;int&amp;quot;).HeaderText(&amp;quot;Account Number&amp;quot;);
    column.For(x =&amp;gt; x.AccountName).DataType(&amp;quot;string&amp;quot;).HeaderText(&amp;quot;Account Name&amp;quot;);
    column.For(x =&amp;gt; x.AccountDate).DataType(&amp;quot;date&amp;quot;).HeaderText(&amp;quot;Account Date&amp;quot;);
    column.For(x =&amp;gt; x.AccountType).DataType(&amp;quot;string&amp;quot;).HeaderText(&amp;quot;Account Type&amp;quot;);
    column.For(x =&amp;gt; x.AccountBalance).DataType(&amp;quot;number&amp;quot;).HeaderText(&amp;quot;Account Balance&amp;quot;);
})

In VB.NET will look like this:
.Columns(Function(columns)
	columns.For(Function(c) c.AccountNumber).HeaderText(&amp;quot;Account Number&amp;quot;).DataType(&amp;quot;int&amp;quot;)
	columns.For(Function(c) c.AccountName).HeaderText(&amp;quot;Account Name&amp;quot;).DataType(&amp;quot;string&amp;quot;)
	columns.For(Function(c) c.AccountDate).HeaderText(&amp;quot;Account Date&amp;quot;).DataType(&amp;quot;date&amp;quot;)
	columns.For(Function(c) c.AccountType).HeaderText(&amp;quot;Account Type&amp;quot;).DataType(&amp;quot;string&amp;quot;)
	columns.For(Function(c) c.AccountBalance).HeaderText(&amp;quot;Account Balance&amp;quot;).DataType(&amp;quot;number&amp;quot;)
	End Function) _
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Note the simple replacement of =&amp;gt; with Function, where the left hand variable is now the function argument. That’s all we have to do. So then our complete view code looks like the following:&lt;/p&gt;

&lt;p&gt;&amp;#160;&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:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:36cd6ce6-6311-4db3-8328-69f0f6cf232a" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: c#;"&gt;@(
            Layout = &amp;quot;~/Views/Shared/_Layout.vbhtml&amp;quot;
)
@Imports Infragistics.Web.Mvc
@ModelType IQueryable(Of Mvc3WebAppVB.BankAccount)
&amp;lt;br /&amp;gt;
&amp;lt;br /&amp;gt;
@(Html.Infragistics().Grid(Model) _
        .ID(&amp;quot;grid2&amp;quot;) _
        .AutoGenerateColumns(False) _
        .Columns(Function(columns)
                         columns.For(Function(c) c.AccountNumber).HeaderText(&amp;quot;Account Number&amp;quot;).DataType(&amp;quot;int&amp;quot;)
                         columns.For(Function(c) c.AccountName).HeaderText(&amp;quot;Account Name&amp;quot;).DataType(&amp;quot;string&amp;quot;)
                         columns.For(Function(c) c.AccountDate).HeaderText(&amp;quot;Account Date&amp;quot;).DataType(&amp;quot;date&amp;quot;)
                         columns.For(Function(c) c.AccountType).HeaderText(&amp;quot;Account Type&amp;quot;).DataType(&amp;quot;string&amp;quot;)
                         columns.For(Function(c) c.AccountBalance).HeaderText(&amp;quot;Account Balance&amp;quot;).DataType(&amp;quot;number&amp;quot;)
                 End Function) _
        .Features(Function(features)
                          features.Paging().PageSize(20).PrevPageLabelText(&amp;quot;Previous&amp;quot;).NextPageLabelText(&amp;quot;Next&amp;quot;)
                          features.Sorting().Mode(SortingMode.Single)
                          features.Selection().Mode(SelectionMode.Row).MultipleSelection(True)
                  End Function) _
    .ClientDataSourceType(ClientDataSourceType.JSON) _
    .DataSourceUrl(Url.Action(&amp;quot;GetAccountList&amp;quot;)) _
    .DataBind() _
    .Width(&amp;quot;100%&amp;quot;) _
    .Height(&amp;quot;350&amp;quot;) _
    .LocalSchemaTransform(True) _
    .Render())
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;So following the project setup in the original posting (&lt;a href="http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/09/using-netadvantage-jquery-grid-in-asp-net-mvc.aspx"&gt;http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/09/using-netadvantage-jquery-grid-in-asp-net-mvc.aspx&lt;/a&gt;), then adding in our VB.NET specific code that you’ve seen here in this posting, we have a VB.NET MVC application using the JQGrid and Razor syntax.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/image_5F00_2BEBB247.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/robert_5F00_richard/image_5F00_thumb_5F00_0AF83FA0.png" width="599" height="488" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.infragistics.com/community/aggbug.aspx?PostID=325752" width="1" height="1"&gt;</description><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/grid/default.aspx">grid</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/mvc/default.aspx">mvc</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/infragistics/default.aspx">infragistics</category><category domain="http://www.infragistics.com/community/blogs/robert_richard/archive/tags/jquery/default.aspx">jquery</category></item></channel></rss>