jQWidgets Forums
Forum Replies Created
-
Author
-
The point of my question however, was not the localize status. I also have some other code in the bindingcomplete event. If I either have LocalizeStatus(), or the other code, in the bindingcomplete event, I get the empty page. If I remove both, that does not happen.
Thanks Peter,
When I call this after initializing the grid, I get this error:
jqxGrid: The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler.So that is why I placed it in the bindingComplete handler. Do you have a suggestion where I can try to put it instead?
February 24, 2017 at 8:04 pm in reply to: ASP.NET Core with Javascript ASP.NET Core with Javascript #91866Thanks Adopilot,
I had a capitalization issue with TotalRecords. In source, I havebeforeprocessing: function (data) { source.totalrecords = data.TotalRecords; },
The second TotalRecords should be capatilized as shown here.
For some reason it works when pageing, but it did not work when filling the initial grid with less than the full number. As the demo also fills the grid with the full data set, I got confused.
Do you have experience with the sql query? I now use Fetch to only get the 10 records that are needed. But the timing I see does not make a whole lot of difference when fetching the whole set, and then filtering them server side as the ASP.NET Core example is doing. There is an improvement in speed and network bandwith compared to filtering the page client side.
February 23, 2017 at 7:28 pm in reply to: ASP.NET Core with Javascript ASP.NET Core with Javascript #91835Peter,
this is the controller method used in the demo:public ActionResult GridServerEditPagingSortingFiltering(string theme) { ViewData["Theme"] = theme; return View("Grid/GridServerPaging", _context.SalesEmployees.ToList()); }
This supplies all employees to the model. I tried it with supplying only 10 records, but then the grid does not get the total number of records. After paging it does, as this is supplied in the JSONData model that is returned from GetPageData. But if I do not supply the total number of records initially as done in the demo, the grid thinks it only has 10 rows, so it does not want to page.
I found the columns documentation, thank you.
February 23, 2017 at 10:09 am in reply to: ASP.NET Core with Javascript ASP.NET Core with Javascript #91805Well for starters, the DataAdapter only has a getting started, but no API reference documentation like the other widgets.
For the TagHelpers, I found this:
That is a nice overview, but there is no API reference here either. The descriptions are pointers, more than descriptions. Like:
sourceId – {{String}} which determines the data source’s ID member.
sourceId-for – {{ModelExpression}} used for model binding and determines the data source’s ID member.I have no idea what the second line means, it is too short (for me). I know what model binding is, but sourceId also determines the data source’s ID member. It seems to work when you omit sourceId-for.
In the JavaScript version, I had some datafields that I did not include as columns, so I could get the content when a row is selected. Trying to find how to do this with TagHelpers, I found an undocumented attribute “hidden” which seems to do the job. There are many other attributes that are not documented. There is also a “Hideable” attribute, interesting, but what does it do?
Looking at the demo sourcecode, the model gets first filled with all Employees, and then in the view you have:
@{ var employee = Model.FirstOrDefault(); }
Which takes only the first employee, and than passes on the var employee in source-model=”employee”.
I tried filling the model with only the first page worth of data, but that does not work. So in spite of have server processing, you still need to first provide the whole dataset?Kind regards,
PieterFebruary 21, 2017 at 8:31 pm in reply to: ASP.NET Core with Javascript ASP.NET Core with Javascript #91759Well, I got the Tag Helpers working as I want. I know documentation is not high on the list of any developer, but can I vote for more information? There are many undocumented parameters, some obvious, some keep you guessing. I love how the jqxWidgets work, but trial and error discovering the capabilities is not ideal.
Thanks for your help Peter
February 21, 2017 at 4:51 pm in reply to: ASP.NET Core with Javascript ASP.NET Core with Javascript #91754Hi Peter,
unfortunately, I am not looking how to add additional parameters, but how to combine them. If it helps, I can raise a formal incident, so one of the developers can take a deeper look into this?Thanks
Pieter
February 21, 2017 at 1:02 pm in reply to: ASP.NET Core with Javascript ASP.NET Core with Javascript #91746Hi Peter,
you seem to be the most active person, so your colleagues can only try to competeASP.NET Core has a different type of model binding. On a Post, you can only supply one parameter: a model or a simple type. That is why, in the Tag Helper version, you take the filterGroups, pageSize, pageNum, sortField and sortOrder and serialise them all in one string, which is what I need to do as well. The other demo’s don’t do that.
I assume there is an event of some sort that you react to, and then stringify the arguments.The tag helpers are very nice when the integration in Javascript is either not needed or simple. In more complex case, they do not cover the complete functionality. For example I want to change the column layout depending on the page size. And I want to invoke the databinding every 30s. And I have multiple things going on depending on the selected row. All of this is working in my javascript code now, but without an answer to my question here, I can’t implement server processing.
Thanks,
PieterThank you Peter,
sorry I was not clear. The demo pages contain the Views, but not the Controller classes and Models that are used with them. Or is there a link I missed?Kind regards
Pieter
December 4, 2016 at 1:55 pm in reply to: Async remote call gives error Async remote call gives error #89543Thanks Peter,
you put me on the right track, it is now working. I have removed the jsFiddle. I wanted to continously update a grid, so that works now with this:var refreshTim; function refreshGrid() { clearTimeout(refreshTim); if ($('#jqxgrid').is(":visible")) { $('#jqxgrid').source = dataAdapter; $('#jqxgrid').jqxGrid("updatebounddata", "cells"); } else return; refreshTim = setTimeout(refreshGrid, 30000); } $("#jqxgrid").on("bindingcomplete", function (event) { clearTimeout(refreshTim); refreshTim = setTimeout(refreshGrid, 30000); });
November 30, 2016 at 1:00 pm in reply to: Async remote call gives error Async remote call gives error #89443Thanks Peter,
My issue was not with bindingcomplete, I thought it was related to the problem, but maybe not.
My issue is with this error: jqxGrid:The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler.Can you check with my jsfiddle? You can see the error in the console. In the example, it still goes through. In my actual code it breaks the page, as it stops processing my script.
Thanks
Pieter
November 29, 2016 at 10:33 pm in reply to: Async remote call gives error Async remote call gives error #89420Some further testing: .on(“bindingcomplete”, function (event) is not firing the first time after a page refresh (the grid is filled). It is firing after that, and that is when the above mentioned error occurs.
Hi Erick,
that is a warning not an error. The warning is there to tell you that you should not set async:false in an ajax call. It is intentional.Thanks, I changed it.
Pieter
-
AuthorPosts