Infragistics jQuery Rating Control in WebMatrix with Razor

The guys in Engineering are hard at work and are experimenting with native jQuery plug-in controls for the web. With the recent release of WebMatrix and the Razor view engine I thought this might be a good time to show off some of what’s to come.

Note: This code is pre-beta and is not yet available for download. I will post again when we are ready to announce release dates.

The following screenshot shows the client rating control rendered with associated movies and their rating values:

The sample is very easy to construct and gave me good reason to show off how you might use it in WebMatrix/Razor:

To dig in a bit, let’s zoom in just on the code. The image below depicts how I am pulling movie information from the Movies table and setting the rows aside in a variable. Then, after including the required CSS and JavaScript files, the rating control is configured during the jQuery ready handler:

The control is fed a few arguments to get it set up. The voteCount parameter represents the total number of possible votes for the rating, the value is the actual rating value and valueAsPercent tells the control whether or not to treat the value as a percent of the total or as a numeric value in the range.

In the body of the document, I prepared a table to have its contents constructed from a loop that injects the appropriate values from each row in the query result.

There you have it - simple and effective.

More to Come! 

Soon you’ll have access to an array of controls that will work great in ASP.NET WebForms, ASP.NET MVC, WebMatrix and on down the line to PHP and even static HTML files.

Fun times!


Comments  (3 )

aralmo
on Wed, Aug 10 2011 8:29 AM

Would be really nice to see a set of razor-ready, infragistics quality level ,WCAG compliant suit of controls.

I'll buy it even if its in alpha stage. :)

craigshoemaker
on Wed, Aug 10 2011 8:39 AM

aralmo:

We have a new suite of controls, NetAdvantage for jQuery. Here's product info: www.infragistics.com/.../jquery-controls.aspx and here are the samples: samples.infragistics.com/jquery

Will that work for you? :)

caiseodev
on Fri, Aug 10 2012 9:01 AM

Hello

Your post date of August 2011. One Year after , have you made ​​examples with inragistic JQuery Control with Webmatrix and Razor.

Have you created a Helper ( As Nugget )  ?

I'm very interested for that.

Thank you   CaisseOdev

Add a Comment

Please Login or Register to add a comment.