3

The introductory posting for Razor demonstrates the construction of an HTML Helper that passes an inline template to the native Grid object. Instead, I'd like to understand what it would take to create an HTML Helper that renders to my preferred jQuery-based grid (DataTables.net) instead.

Has anyone published samples of jQuery plugins being used within the new HTML Helpers?

thx

1 Answer 1

1

A Razor helper is just a function that outputs HTML. Most jQuery plugins would be reaonable candidates for this. You can have a certain amount of fun with named and optional parameters (which the Razor Web Pages helpers use). All you need to do is effectively expose the jQuery API as a C# one.

Creating a helper to wrap a client side Grid such as jqGrid or DataTables.NET would require a fair amount of work, judging by what's gone into the WebGrid helper.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.