jQWidgets Forums
Forum Replies Created
-
Author
-
December 16, 2013 at 5:25 pm in reply to: Possible bug related to addrow Possible bug related to addrow #46615
also, I ran this in version 3.0.1 on both IE 8 and Firefox 25
August 9, 2013 at 2:59 pm in reply to: Having problems getting correct hour from Griid DateTime field in JSON String Having problems getting correct hour from Griid DateTime field in JSON String #26574One last follow up on this question. What would be the recommended best practice in this situation? JQWidgets does what I would expect, but when I convert the data back to JSON via stringify the times are converted to GMT time instead of the time that was in the grid. I suppose I could send the timezone offset back to the server and update the dates when I process them, but that is a little ugly. Searching google I haven’t found an alternative to stringify that would give me the date in the local time instead of GMT.
August 9, 2013 at 3:26 am in reply to: Having problems getting correct hour from Griid DateTime field in JSON String Having problems getting correct hour from Griid DateTime field in JSON String #26535Actually it looks like this is not a JQWidgets issue at all. The issue is that when I call JSON.stringify it will convert the dates to GMT dates instead of the local datetime.
August 9, 2013 at 3:07 am in reply to: Having problems getting correct hour from Griid DateTime field in JSON String Having problems getting correct hour from Griid DateTime field in JSON String #26534Looking deeper into this I don’t think this has anything to do with the timezone, rather I believe this is a bug. If I change the line where the shippedDate is set in the array to the code below it shows as 2013-08-24 09:12:17AM in the grid as you would expect, but when you export the grid to JSON it is still off by four hours [{“shippedDate”:”2013-08-24T13:12:17.000Z”,”shipName”:”test”,”uid”:0}]. Its almost as if it is trying to adjust the timestamp to some other timezone. Remember, in this example now there is no other timezone or server, everything is on my machine.
var shippedDate =["2013-08-24 09:12:17AM"];
August 8, 2013 at 5:21 pm in reply to: Having problems getting correct hour from Griid DateTime field in JSON String Having problems getting correct hour from Griid DateTime field in JSON String #26504ok, but when it comes down from the server and the grid renders it correctly, shouldn’t it send back the same value correctly as well? The grid seems to be smart enough to figure that out, as in the example, the grid shows the date 2013-08-24 08:11:09PM, which is correct, but when I click the JSON which exports the date to JSON the resulting date is [{“shippedDate”:”2013-08-25T00:11:09.000Z”,”shipName”:”test”,”uid”:0}], which is four hours off. I am a little confused as to how I can handle this.
August 8, 2013 at 2:28 pm in reply to: Having problems getting correct hour from Griid DateTime field in JSON String Having problems getting correct hour from Griid DateTime field in JSON String #26495That may be the issue as my server is passing in a format that I am not familiar with (the date comes in a numeric format). I have an example below that illustrates my issue. The grid produce the correct result from the data source, however, when I convert it to JSON by hitting the JSON button the resulting JSON string is off by a four hours. Possibly the number format have the timezone built in and when it is exported it is using the local timezone? If it makes any difference I am using JQWidgets 2.8.3.
<!DOCTYPE html><html lang="en"><head> <title id='Description'>This example shows how to enable sorting and sort by a column. </title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxpanel.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <script type="text/javascript"> $(document).ready(function () { var theme = getDemoTheme(); // prepare the datavar data = new Array();var shippedDate =["1377389469000"];var shipName =["test"];var row = {};row["shippedDate"] = shippedDate;row["shipName"] = shipName;data[0] = row; // prepare the data var source = { localdata: data, datatype: 'array', datafields: [ { name: 'shippedDate', type: 'date' }, { name: 'shipName', type: 'string', format: 'yyyy-MM-dd hh:mm:sstt' }, ], id: 'id', data: data }; var dataAdapter = new $.jqx.dataAdapter(source); // create jqxgrid. $("#jqxgrid").jqxGrid( { width: 670, height: 450, source: dataAdapter, theme: theme, altrows: true, columns: [ { text: 'Ship Name', datafield: 'shipName', width: 250 }, { text: 'Shipped Date', datafield: 'shippedDate', width: 200, cellsformat: 'yyyy-MM-dd hh:mm:sstt' } ] }); $('#events').jqxPanel({ width: 300, height: 80, theme: theme }); $('#jsonbutton').jqxButton({ height: 25, theme: theme }); $('#jsonbutton').click(function () { var jsonObj = $('#jqxgrid').jqxGrid('getrows'); alert(JSON.stringify(jsonObj)); }); }); </script></head><body class='default'> <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;"> <div id="jqxgrid"> </div> <div id="eventslog" style="margin-top: 30px;"> <div style="float: left; margin-right: 10px;"> <input value="JSON" id="jsonbutton" type="button" /> <div style="margin-top: 10px;" id='sortbackground'>Sort Background</div> </div> <div style="margin-left: 100px; float: left;"> Event Log: <div style="border: none;" id="events"> </div> </div> </div> </div></body></html>
July 15, 2013 at 2:57 pm in reply to: Sorting after setcellvalue call not working Sorting after setcellvalue call not working #25181fyi, this turned out not to be an issue. The problem was caused elsewhere in the code by improperly making beginupdate/endupdate calls in my code.
July 3, 2013 at 1:02 pm in reply to: User entered tags in a grid column User entered tags in a grid column #24404I don’t think that is correct. If you go to any of your editing demos, go into edit mode on a cell and then type in the example button tag below and tab off of the field, when you leave the cell a button will be visible in the cell.
<button>TEST</button>
Peter, I’m not ready to call it a bug yet, but I do see a similar behavior that Marco reported when upgrading from 2.8.3. A number of grids show loading, but never load. Other ones do load, but do not render correctly (it appears as if the row data is all showing in the first column with the columns overlaying each other). I will look into it further to see if it is something that can be corrected easily, but I did want to bring it to your attention that this may not be an isolated issue. I only upgraded it yesterday and didn’t spend any time on it after the upgrade, so I will keep you posted.
June 20, 2013 at 4:06 pm in reply to: cellvaluechanged not executing when expected cellvaluechanged not executing when expected #23505In my case, the effect of the button will vary based on the value of the Drop Down column. To the user, it appears that they have changed the value after selecting it from the dropdown, but the button will behave incorrectly because the new values have not yet been accepted (this is probably also the case for edit columns). Is there a way to force the changes to be accepted? Could I trigger the cellendedit event maybe to force the change to process before, possibly at the beginning of the buttonclick? Maybe even a generic accepttext type of event that would cause any existing cells that have focus to lose focus (or behave as if they had lost focus?
May 23, 2013 at 12:32 pm in reply to: Unexpected behavior with Keys/Values Column Unexpected behavior with Keys/Values Column #21759Thank you Peter, that was exactly what I was looking for.
May 22, 2013 at 8:31 pm in reply to: Unexpected behavior with Keys/Values Column Unexpected behavior with Keys/Values Column #21674also, if you need an example, you can use the Key/Values example and just add a couple of employees to the employee.xml file. Currently they all show in the drop down because the IDs for those employees also exist in the orders xml, but any employees that do no exist in the orders.xml will not display in the drop down.
April 24, 2013 at 6:51 pm in reply to: Very poor response time with IE Very poor response time with IE #19941Huge difference! Thanks you, keep up the great work on this project!
April 22, 2013 at 3:32 pm in reply to: making a column non-editable making a column non-editable #19768Hi Peter, similar question. Would you have an example of setting this property after the Grid has already been created? I am having trouble finding the API to change the editable attribute for a column when it is not part of the create block.
April 2, 2013 at 4:54 pm in reply to: endcelledit not being called when toolbar button clicked endcelledit not being called when toolbar button clicked #18447ok, thank you. I’ll keep my eye out for the enhancement in future versions.
-
AuthorPosts