jQWidgets Forums
Forum Replies Created
-
Author
-
September 12, 2013 at 3:00 pm in reply to: Problem on Calendar October Problem on Calendar October #28863
Hello Dimitar,
In fact I didn’t make anything. I think it’s because of me timezone/local. I’m from Brazil, and as you can see in the image, the timezone is GMT -0300. To get the same error as me, you need to somehow change to the same local/timezone as me.
Hope this helps.
Thanks,
FilipeSeptember 12, 2013 at 11:40 am in reply to: Problem on Calendar October Problem on Calendar October #28851Hello Dimitar,
I’ve looked the link you sent, and I still face the same problem. I post an image so you can check what kind of problem it is: Calendar problem
As I said, the problem occurs because of daylight saving time.
Hope this can help you to find a solution.
Thanks,
FilipeSeptember 11, 2013 at 3:18 pm in reply to: Problem on Calendar October Problem on Calendar October #28788I found the error. The problem is with daylight saving times. On the third week of october is when starts the daylight time in my time zone.
I use this workaround: http://www.codeproject.com/Tips/305333/Problem-and-solution-of-add-date-into-javascript-w
The days now count correct, but there is still a problem. When I try to select the saturday, it also selects the sunday. I can’t select only one of them, on this weekend of the change on time. Is there any way to fix this?
Thanks,
FilipeJuly 17, 2013 at 8:47 pm in reply to: Error on 'addrow' method of jqGrid Error on 'addrow' method of jqGrid #25380Hello,
what I had made is just implement the addrow callback and then increase by one the totalrecords value on the datasource, but it still doesn’t work. Is there something different that I need to make to add an empty row in virtual mode?
Thanks again,
FilipeJuly 16, 2013 at 1:34 pm in reply to: Error on 'addrow' method of jqGrid Error on 'addrow' method of jqGrid #25250Ok, so I will try to explain my environment.
I have this source configuration. Here I have my updaterow function declared:
var sourceConfiguration = { datatype: "json", datafields: datafields, url: '/api/Resources/', root: 'Records', beforeprocessing: function (data) { // Used by the pagination to know the total number fo records. sourceConfiguration.totalrecords = data.TotalRecords }, sort: function () { // update the grid and send a request to the server. $("#resources-grid").jqxGrid('updatebounddata', 'sort'); }, updaterow: function (rowid, rowdata, commit) { if (fieldBeenEdited && fieldBeenEdited !== 'ResourceType' && fieldBeenEdited !== 'ResourceKey') { var data = { resourceType: rowdata['ResourceType'], resourceKey: rowdata['ResourceKey'], cultureCode: fieldBeenEdited, resourceValue: rowdata[fieldBeenEdited], id: rowdata[fieldBeenEdited + '_id'] || '' }; $.ajax({ dataType: 'json', url: '/api/Resources', data: data, type: 'PUT', success: function (data) { commit(true); var fieldID = fieldBeenEdited + '_id'; fieldBeenEdited = ''; $("#resources-grid").jqxGrid('setcellvaluebyid', rowdata['uid'], fieldID, data); }, error: function () { // cancel changes. commit(false); } }); } else { commit(true); } } };
As you can see, there is a fieldBeenEdited variable that stores the field been edited, so I don’t need to send all the row to the server, but only the value changed. I get this value on cellendedit event:
$('#resources-grid').on('cellendedit', function (event) { fieldBeenEdited = args.datafield; });
And here is the jqGrid initialization code:
$('#resources-grid').jqxGrid({ source: dataAdapterConfiguration, width: '100%', columnsresize: true, columnsreorder: true, editable: true, pageable: true, //sortable: true, showsortcolumnbackground: true, columns: columns, autoheight: true, // Those two options are needed to make server side pagination. virtualmode: true, rendergridrows: function (obj) { return obj.data; }, showtoolbar: true, rendertoolbar: function (toolbar) { var addButton = $('<button class="btn"><i class="icon-plus"></i> ' + Globalize.localize('[Resources.Admin.AddNewResource.Value]') + '</button>'); toolbar.append(addButton); addButton.click(function () { if ($("#cultures-listbox").jqxListBox('getCheckedItems').length !== 0) { $('#resources-grid').jqxGrid('addrow', null, {}); } else { alert('[ChooseOneLanguage]'); } }); }, ready: function () { _(availableCultures).each(function (culture) { $('#resources-grid').jqxGrid('hidecolumn', culture); $('#resources-grid').jqxGrid('hidecolumn', culture + '_id'); }); } });
I also have two checkboxes list that controls wich columns are displayed each time. So, this is the basic scenario. Cutting off the sorting function, that works. One thing that I noticed is that when I add a new row when sort is on, it is pushed at the end of the grid, but after the first edit, the row moves to the top of the grid. I don’t know if this is causing the unexpected behavior, but when the sort is off, the new row stays at the bottom.
Hope this can give some clue of the problem I’m facing.
Thank you for the help.
July 15, 2013 at 8:39 pm in reply to: Error on 'addrow' method of jqGrid Error on 'addrow' method of jqGrid #25208I saw that the error occurs when the sort option is on. Turning off sorting, it works fine. Is there some problem relating the add of new rows and sort operation?
June 24, 2013 at 12:15 pm in reply to: Calendar Today Button Internacionalization Calendar Today Button Internacionalization #23679Thanks, it worked!
Now, in my case I don’t need the “Clear” button. I’ve tried to set his label to ‘ ‘. I worked, but the today button was not aligned to the center. Is there any other way to do this?
Thanks,
Filipe -
AuthorPosts