Hi, i am working with JQGrid plugin too. Just to get your approach right.. you´ve realised a Master-Detail function with the JQGrid? Very nice! May i can use this too.
Is the code(for Controller, View) from your last post working, right now? Did you made any changes to the ##model code? I am trying to implemented the "Subgrid" feature: http://www.trirand.com/blog/jqgrid/jqgrid.html ->"New since beta 3.0" ->"subgrid with JSON Data" This could be a nice feature, and also it would be cool to let the grid show Images from the "upload" Field. Dieter Asman On 14 Mai, 11:32, Jason Lotz <jayl...@gmail.com> wrote: > Sorry to keep replying to myself. Just wanted to let you know my > progress. After stepping back and evaluating the case I managed to > configure it as I wanted. > > ## View > jQuery(document).ready(function(){jQuery("#%(id)s").jqGrid({ > onSelectRow: function(postdata){$("#myframe").attr('src',"/MyApp/ > default/details/"+(postdata));} > > }); > > ## Controller > def details(): > id = request.args[0] > // everything else > return dict() > > Jay > > On May 14, 5:58 pm, Jason Lotz <jayl...@gmail.com> wrote: > > > The first and obvious thing I see I did wrong was trying to put python > > into jquery script. > > > jQuery("#%(id)s").jqGrid({ onSelectRow: function() { > > $ > > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");} > > > But I still don't understand how I can make it dynamic src, or how to > > get jquery to communicate with the server. > > > Jay > > > On May 14, 4:59 pm, Jason Lotz <jayl...@gmail.com> wrote: > > > > Now I have two containers, one includes jqgrid_plugin the other > > > includes iframe to display /default/details view. Both work fine on > > > the initial load of the page. Using jqgrid onSelectRow event I tried > > > to add a function to update the iframe page. > > > > ## View > > > <div> > > > {{=plugin_jqgrid(db.test,columns=['fields'],height=200)}} > > > </div> > > > <div> > > > <iframe id="myframe" src="{{=URL(r=request,f='details',args=2)}}"></ > > > iframe> > > > </div> > > > > ## model > > > jQuery(document).ready(function(){ > > > jQuery("#%(id)s").jqGrid({ onSelectRow: function() {$ > > > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");} > > > > }); > > > > However when a row is selected the iframe returns Invalid Request. > > > It's not even calling the controller, just displays Invalid Request. I > > > haven't quite figured out how to get jqgrid and the server > > > communicating. I've been able to show grid values using alert and get > > > jquery to handle data sent from server but can't get jqgrid to trigger > > > the server and the server read jqgrid.Parameters. > > > > Any suggestions as to the best way to update iframe contents by > > > selecting a row? And/Or someone kindly provide some sort of > > > explanation how jquery and server communicate would be greatly > > > appreciated !!.. > > > > Jay > >