ListView with dynamic pagination - gluon

I need a ListView/CharmListView with dynamic pagination, loading dynamically from server. Is this possible?
My backend method already waits for start, page and limit url parameters.
Thanks!

Related

DataTables - Specify page size on server side

When using DataTables, how can I control page size on the server-side? I want to take advantage of bult-in navigation buttons (prev, next etc.), but don't want clients to be able to dictate page size.
The only option I see is pageLength which controls page size from client's end, which defeats the purpose in my case.
This is Laravel application and I'm using Yajra package (DataTables as a Service) implementation. Note that I can't use Eloquent's built-in pagination because then I'll have to manage navigation myself and will also need to disable DataTable's own navigation because that one depends on pageLength.
A good way is to remove the present page size in the datatable by adding paging to false on data table options.
Then u can do pagination by simply add laravel pagination class when dragging data from your models. E.g
$all_items = user model::paginate($page_size,['*'],'page_no');
The last variable of the paginate method is just indicating the parameter name of the page no. Useful when you have more than pagination in a page. It can be changed to whatever unique value u like.

How can I load data into a RadComboBox via AJAX without using Load On Demand?

I have a page containing five RadComboBoxes that all need to populated from a database (via SQL Server stored procedure). Currently they are bound to the data using the OnLoad event, but that causes the page to load slowly. I am required to use other features of the RadComboBox (specifically checkboxes) that, according to Telerik's docs, are not compatible with the built-in LoadOnDemand feature.
How would I mimic the LoadOnDemand feature to reduce the load time of the page?
Thanks!
This is correct, yes, but you still can use the ItemTemplate and put a checkbox element there and use it with Load on Demand.
See the first combobox in this demo:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx
It will require some more work from you in order to define the template and then manually get the checked items, but it is not impossible.

Delay knockout foreach binding

I'm having problems with a product list with filters, sorting and pagination. For SEO reasons, the product list page will be able to be visited, and correctly filtered and bound using server side code. Search engines will therefore be able to crawl it from links on the site. However, I also want the product list to be filterable on the client side for speed and usability. I'm therefore using knockout for this, but I don't want the client side binding to clash with the server side binding.
The flow for the page will be:
1. Page gets hit and ASP.NET binds the product list using query string parameters to set filtering options
2. An AJAX call is made from the client browser to request all products. Knockout will filter against these and bind them to the page.
3. Any change of filtering made in the browser will be managed by knockout, and the bound product list will update
The problem is between step #1 and #2. Technically, this is what happens:
1. The server binds the product list correctly, no issue here
2. Knockout is loaded by the browser with an empty array of products (it's not made the ajax call yet), so knockout takes control of the foreach binding and removes all the server bound products.
3. A very short (but noticeable) time later, the ajax call responds successfully and populates the knockout observable array, and the products are correctly bound once again unnecessarily (should be the same result as the server side binding).
The question is, how can I remove the disappearance of the products that happens in step #2? My thoughts are something along the lines of having a boolean that only allows the knockout foreach binding to be activated when it's true (after a manual interaction with the filtering, sorting or paging, which would mean that on page load, only the server side binding happens, and knockout managed any other client interaction. Is this possible?
I have a very basic JS fiddle of my problem here:
http://jsfiddle.net/ajbrun/hqpz3w6h/2/
Currently using mapping plugin to populate the observable. I've also tried making my own custom binding and using the beforeRemove event, but I haven't yet found a solution.
ko.mapping.fromJS([]);

Is there a way to combine Server Binding and Ajax Binding to eliminate the extra request made in Ajax Binding on a Kendo grid?

By default the Kendo Grid for ASP.NET MVC will perform server side requests and load the page and grid on a single request. However, when configured for ajax binding the Kendo Grid for ASP.NET MVC will make ajax requests after the page is loaded which requires one extra request (one for the page and one extra for the data used by the grid). Is there a way to combine server binding and ajax binding to eliminate the extra request made in ajax binding alone? All I'm looking is to load the data for the page and grid at the same request (like Server Side Binding) for the first time and use ajax binding for subsequent requests. To disable the initial load on ajax binding we can disable the AutoBind Configuration Option (autoBind:false) of the grid. Now, I need a way to show the data on the grid while the autobind option is disabled. Any idea????
To bind the Grid initially you should either pass your collection to the Grid method.
Html.Kendo().Grid<Customers>(theCollectionOfCustomersWhichWillBeUsedInitially)
//...
Or you could pass it to the BindTo method (which is actually the same ;)
Html.Kendo().Grid<Customers>()
.Name("someName")
.BindTo(sameCollectionasAbove)

Drupal Views Ajax refresh rows

I have some view (Views 2 - list of invitations, table style) which uses embedded forms to edit records directly in view rows.
I am using ahah to change values in records. What I need is to refresh all records dynamically (some calculations) after I change some checkboxes.
Is there any way to refresh view using Ajax?
To trigger reload table rows only form the code?
I suspect it must be some way (some command) as there is a Use Ajax option in views for sorting tables, etc...
Any hints would be much appreciated
In basic settings there is the 'use ajax' option which :
If set, this view will use an AJAX mechanism for paging, table sorting and exposed filters. This means the entire page will not refresh. It is not recommended that you use this if this view is the main content of the page as it will prevent deep linking to specific pages, but it is very useful for side content.
you may find the module Ajax Views Refresh useful

Resources