Get JqGrid here: http://www.trirand.com/blog/
So far I’ve seen two implementations of ASP.Net wrapper on JqGrid, one involves a httphandler and the other involves using a web service. Both add extra work onto the gridview/datasource pattern.
Instead I had the JqGrid use a Callback Event Reference (Page.ClientScript.GetCallbackEventReference()) with async (a parameter) set to true, this allowed me to call back directly to the custom asp.net JqGrid control instance and access the DataSource.
This is not ideal, as it passes the view state to the server first but it is the simplest and cleanest going from ASP.Net GridView to JqGrid.
Other useful information
Inherit CompositeDataBoundControl and add the attribute
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public DataControlFieldCollection Columns { get; set; }
in order to get
<My:Grid>
<columns>
<asp:BoundField….
working
implement CallbackEventHandler otherwise the Page.ClientScript.GetCallbackEventReference() won’t work.
I’d recommend using Rick Strahl’s ClientScriptProxy for registering your Javascript, it solves the problem of whether the page your control ended up on has a scriptmanager. Find that here: http://www.west-wind.com/weblog/posts/10246.aspx
Here are some pages I found helpful on JqGrid: (if I find any more I’ll add them)
http://www.nshaw.com/2009/01/jqgrid-and-aspnet-web-forms-with-json.html
http://geeks.netindonesia.net/blogs/cipto/archive/2009/04/03/jqgrid.aspx
http://www.codeproject.com/KB/WCF/jqGrid.aspx
Related posts:
- Handling Relative Paths and debug mode with Jquery in ASP.Net Web Forms I had a problem where I wanted to use the...
- Can't Register Javascript for Invisible Control I was writing an ASP.Net Dialog Control and I overwrote...
Related posts brought to you by Yet Another Related Posts Plugin.