
Hooking up a JQuery Form Dialog Widget to an ASP.NET GridView Control
Let’s face it: the stock ASP.NET GridView control has some behaviors and limitations that aren’t exactly optimal. For starters, the lack of a nice way for users to add new rows to the grid is unfortunate. There are, of course, several different work-arounds for this all of which have their pros and cons.
I have been testing out using the JQuery Modal Form dialog widget as an input mechanism for new GridView rows. This has the benefit of not requiring the use of ASP.NET’s heavyweight ViewState and constant back and forth communication with the Web Server. Also, the modal nature of the widget on the Web form is a benefit.
The obvious drawback of using client side code is that the newly added rows are not stored in ViewState and you will need to handle them yourself. This really isn’t a big deal if you consider using Ajax calls to a Web Service rather than a complete form submission.