jQuery UI Widgets › Forums › Grid › Ajax load on details column
Tagged: Ajax column details
This topic contains 5 replies, has 2 voices, and was last updated by JmiXIII 12 years, 7 months ago.
-
Author
-
Hello,
I can achieve static column details without pb.
I would like to load the details when expanding the column but it seems there is no option implemented in the API.
Here is my static view coded with web2py :
{{extend 'layout.html'}}$(document).ready(function () {
var data = {"Products": {{=XML(liste)}} }; // Json passed statically ~1500 to 10000 lines, no need for remote at the momentvar source =
{
localdata: data,
datatype: "json",
root: 'Products'
};var dataAdapter = new $.jqx.dataAdapter(source);
$("#jqxgrid").jqxGrid(
{
width : 1000,
height : 500,
source: dataAdapter,
columnsresize: true,
pageable: false,
autoheight: false,
sortable: true,
filterable: true,
enabletooltips: true,
groupable: false,
altrows: false,
columnsresize: true,
selectionmode: 'multiplecellsextended',
columnsmenuwidth: 20,
rowdetails: true,
//initrowdetails: initrowdetails,
pagesizeoptions: ['10', '20', '50'],
columns: [
{{for field in db.NC.fields[1:]:}}
{ text: '{{=field}}', dataField: '{{=field}}' ,width: 100 },
{{pass}}
{ text: 'link', dataField: 'link' ,width: 100 },],
});//set row => here LOAD ajax function is performed on all lines when loading the page
$("#jqxgrid").jqxGrid('beginupdate');
{{for row in liste1:}}
$("#jqxgrid").jqxGrid('setrowdetails', {{=row.NC_Num}},"{{=LOAD('nc','form.load',args='1', ajax=True)}}", 200, true);
{{pass}}
$("#jqxgrid").jqxGrid('resumeupdate');});
The {{=LOAD(…)}} component is rendered as follows:
loading...But the code above is evaluated immediately after the page is rendered. Do you know I could avluated it after examples ?
If no can you show an ajax load example when expanding a row ?Best regards
The {{=LOAD(…)}} component is rendered as follows:
loading...The {{=LOAD(…)}} component is rendered as follows:
script type=”text/javascript”/script
loading…Sorry I had to remove on script so that it is readable
>!--
web2py_component("/test/nc/for.load/1","c282718984176")
//--<loading...>!–
web2py_component(“/test/nc/for.load/1″,”c282718984176”)
//–<is a component inverted
The ‘initrowdetails’ callback function is called when the row details are opened. You can see how the nested grid is initialized in this demo after the user opens the details: nestedgrids.htm
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks,
I’ve spent nevertheless hours before understanding why event does not fire.
Here was the answer :
http://www.jqwidgets.com/community/topic/bindingcomplete-event-not-firing/Still having pb from mixing server call from js but this not related to jqxgrid.
Good JS Library.
-
AuthorPosts
You must be logged in to reply to this topic.