jQWidgets Forums
Forum Replies Created
-
Author
-
Hello,
Have you been able to get a solution for me ?Hello,
If I cannot be helped I guess you should tell me but not ignore it.Hello Peter,
I have tried to understand the concept you explained but it ain’t working
this is a demo page from jqwidgets. can you please use that to show me what you meant
Please!Hello Peter,
I have tried to understand the concept you explained but it ain’t working
this is a demo page from jqwidgets. can you please use that to show me what you meant
Please!Hello Peter,
Can you like just tell me how to access the inner grid. Just a hint and I will pick it up from there
ThanksYes I can understand that but the inner grid does not have an element Id like the outer grid does. I hope you do understand me. I don’t know how to access the inner grid . What selector do I use to select it.
Also I want to be able to get the datarecord of a row in the inner grid. Assuming a user clicks a row in the inner grid i want get full row and be able to fetch each individual cell or datafield item.
Need your help on this urgent
thankshello,
I have solved the problem
ThanksNovember 5, 2012 at 11:39 am in reply to: Bug in custom page sizes in grid? Bug in custom page sizes in grid? #10538Hello, I faced the same problem and I could not overcome it. However, I solved it by using Iframes. so the grid is a different file so when search button on the parent form is click just pass all values in the url to the Iframe url and reload the frame. It also becomes difficult for the frame to adjust to the height of the grid in the parent window so I got a plugin that automatically does the adjustment. In all you will achieve the same objectives of searching and your users will not really notice the difference so much else you can wait for the Jwidget team to respond
Oh peter you left me to my faith but gladly I have found out why my virtual paging stuff was not working..
I want to share it with the world anyway.Undoubtedly we all know by now that Jawidget grid uses ajax and by default all jquery ajax calls have async set to true.
The grid source object also have async property set to true. that is async:trueasync: By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. When the binding is "asynchronous", the data binding operation occurs in parallel and the order of completion is not guaranteed.
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm
It means that everything on the page will fully be loaded to the client machine before the ajax call is completed but the grid must load with the whole page and by then the grid have processed all properties already before the ajax call is returned which should contain the TotalRows value in json.(sometimes they make it seems as if all these are processed in parallel). Since the grid have been processed it means that even if you set source.totalrecords = data[0].TotalRows; as shown the various examples it will not work and the source.totalrecords property will contain no value making your virtual paging not to function as in my case( but the grid will display only the first page which in this case will be the value of your pagesize property)
All I did was set the source object async property to false (async:false) and it worked. This can escape all of us because the various examples provided did not show all this in it. setting source object async property to false just tells javascript that please wait till ajax calls are returned before you continue interpreting the rest of the codes otherwise the codes will be processed before the ajax call is returned.
This is what I found out when I used firebug and other DOM developer tools from mozilla… but I might wrong as am expert and if there are any misinterpretations I hope I can be corrected by the moderator for future references
Thanks
Hello,
I have been there and I have exactly what have been specified yet it does not work…
example is if yourendergridrows: function(){ return dataadapter.records;}
the grid will never load but that is the example give. however if you use
rendergridrows: function(obj){ return obj.data}
the grid will load but load only the first page and stop…
Peter I understan the column rendering and have looked at the sample however, i cannot understand the second problem I have reported. I followed the example supplied in the demo http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/toolbar.htm and i can see only one url which feeds the grid. does that mean there is some php code in the url that processes what the user enters. please point a resource that demonstrate this or you could as well just add a comment to my code as to where i should do the amendments please
When i type into the input box all my keystrokes do not appear. I have tried using the newer version 2.4.2 yet the problem persist. However when i click on a row in the gird and start typing then the input box also picks it up and an editable cell in the grid also gets edited..
Was using 2.4.0
I just updated it to 2.4.1 and all seems well. I will keep an eye on any of these anomalies and let you know should any pop up
ThanksHello,
My Chart is displaying correctly and thank you but I have another problem.
That is the title of the chart doesn’t display in Chrome Browser, Mozilla, and Safari but displays correctly and nicely in Internet Explorer. Is this a know issue or there is something more that i should do.
thank youHello,
Am totally confused now because i have everything that there is to do but the chat is not appearing. am frustrated now. I have spend two days on this. Please kindly help me sort this out…this is my code for the html side.
<!DOCTYPE html><html><head><title>J.K. Horgle Transport Ltd 2012</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><link href="../css/admin.css" rel="stylesheet" type="text/css" /><!--provides jqwidgits files--><link rel="stylesheet" href="../js/jqwidgets/styles/jqx.base.css"type="text/css" /><link rel="stylesheet" href="../js/jqwidgets/styles/jqx.energyblue.css" type="text/css" /><!--provides jqwidgits files--><script type="text/javascript" src="../js/scripts/jquery-1.7.2.min.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxcore.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxbuttons.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxvalidator.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxdatetimeinput.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxcalendar.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxdata.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxlistbox.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxscrollbar.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxdropdownlist.js"></script><script type="text/javascript" src="../js/jqwidgets/globalization/jquery.global.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxmenu.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxwindow.js"></script><script type="text/javascript" src="../js/jqwidgets/jqxchart.js"></script><script type="text/javascript" src="../js/scripts/gettheme.js"></script><script type="text/javascript">$(document).ready(function () {//var theme = 'energyblue';var theme = getTheme; //build the pie chart for display in the popup window var url = 'p.php'; var source = { datatype: 'json', datafields: [ { name: 'items' }, { name: 'total' } ], url: 'p.php' }; var dataAdapter = new $.jqx.dataAdapter(source, { async: false, autoBind: true, loadError: function (xhr, status, error) { alert('Error loading "' + source.url + '" : ' + error); } }); // prepare jqxChart settings var settings = { title: "Desktop browsers share in Dec 2011", description: "Nothings here for now", enableAnimations: true, showLegend: false, legendPosition: { left: 520, top: 140, width: 100, height: 100 }, padding: { left: 5, top: 5, right: 5, bottom: 5 }, titlePadding: { left: 0, top: 0, right: 0, bottom: 10 }, source: dataAdapter, colorScheme: 'scheme02', seriesGroups: [ { type: 'pie', showLabels: true, series: [ { dataField: 'total', displayText: 'items', labelRadius: 100, initialAngle: 15, radius: 130, centerOffset: 0, formatSettings: { sufix: '%', decimalPlaces: 1 } } ] } ] }; // setup the chart $('#piechart').jqxChart(settings);});</script></head><body> <!--Line chart graph begins here --> <div id="piechart"></div></body></html>
this is my PHP code
<?phprequire_once("../php/conn.php");$select = 'SELECT t.productLoaded AS items, COUNT( t.productLoaded ) AS totalFROM trip t, multipleDestination mWHERE t.loadingDateBETWEEN "2011/11/13"AND "2012/08/01"AND t.wayBillNumber = m.wayBillNumberGROUP BY t.productLoaded'; $result = mysql_query($select); //get data and store in a json array if($result){ while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $piechart[] = array( 'items' => $row['items'], 'total' => $row['total'] ); } echo json_encode($piechart); } ?>
this is the json that is produced after the query runs
[{"items":"Diesel Effimax","total":"1"},{"items":"DX","total":"2"},{"items":"PMS","total":"2"}]
-
AuthorPosts