Visual Force : Pagination & Sort Columns in Datatable - datatable

I have a functionality to be implemented in Visual force page. Which consumes List and renders a Datatable.
I need some help in implementing Pagination in Datatable? Does Salesforce support any Pagination mechanisms in-built?
As well as I need help on sorting the columns of a Datatable.
Please give me inputs on this.
Thanks in advance.

Salesforce apex:dataTable does't support in-built pagination.
Here are some links you can implement pagination.
http://www.infallibletechie.com/2013/05/pagination-using-apexdatatable-in.html
https://developer.salesforce.com/blogs/developer-relations/2012/01/soql-offset-in-spring-12.html
The below link example is for pageBlockTable,you can use it for apex:dataTable as well.
http://forceguru.blogspot.in/2011/04/pagination-in-salesforce.html

Related

Sorting and filtering in DataGridView windows application

Hi I am looking to implement sorting and filtering in datagrid view of windows form. So far articles read shows to create a button and on click of that do sorting and filtering. But I want that functionality on grid headers. Are there any third party available that provide us with this feature or is there any other in build way?
Please guide.
the datagridview has alongside the headertext sortingsoptions.
Filtering goes by filtering the datasource for example the dataview o fa table

Drag and drop in datatables

Hope you are doing well. Kindly help me out here. I am using Yajra data tables in laravel 5.3. I need to implement UI sorting ( drag and drop ), like when showing some records in datatable, i want to change the order of records and then save it back to data base through drag and drop. If there is any package or some useful links, kindly let me know. Thank you.
I don't know much about Yajra, but it looks like it makes Jquery datatables (https://datatables.net/) that seem quite sortable already.
For the drag and drop you might want to have a look at jquery sortable (https://johnny.github.io/jquery-sortable/)
Hope that helps you find the way!
Please check with below link,
http://web1.cs-computing.com/apps/demo/bootstrap/bootstrap_demo.nsf/dnd.xsp
I had tried this and it is working with me. Multiple options are there with drag, drop and sort.

Multi-column sorting for a repeat control having its source as document collection

Don't know whether it is possible but is there way in which I could provide multi-column sorting in a repeat control which displays field values from a document collection?
The easiest way to get the multi-column sorting is to use a Data Grid.
Out of the Extension Library box you can use the Dojo Data Grid control. Brad Balassaitis wrote a good description how to use it in his blog Xcellerant. There you can find a link to an example database too. A good starting point is the XPages "REST_DojoGrid" in database XPagesExt.nsf which is included in Extlib download also.
As an alternative you could use data grids based on jQuery like jqGrid.
You could do a lot of complicated stuff, like putting docs into a java TreeMap object in order to sort them on the fly.
Or you simply use jQuery and the tablesorter plugin: http://tablesorter.com/docs/

What is the right combination to use Paging and styling in MVC?

I may not be finding the best way to ask this, but I'm learning MVC by trying to build a small website. This is supposed to be a shopping website. Here I am on the part of displaying items on the page. I came through webgrid, but its displaying items in tabular form. Should I learn the tricks of tables like those in html? Because I have heard they can be modified to give any view?
Or can there be other alternatives to webgrid? I really like its Paging feature. I don't think I'm good enough right now to code for that. I have tried some googling and found jqgrid but that also seems to be good for tabular representation of data. I have been trying with this webgrid thing from last night and its really not coming together all good. What else can be the option? I mean something abstract enough to provide me good looks of a shopping website's product page, when I can provide a List of products(the model) from controller to the view? Then what?
Update: Basically I wanna know what part am I missing? Modifying Table to create good views? using webgrid properly? Or am I using the webgrid wrongly? something else should be used in this scene?
You can take a look at this simple of example of how to use Twitter Bootsrap to style a WebGrid: WebMatrix WebGrid – Re-Working the Pager.
You can also check out the Twitter Bootstrap site for examples of other ways this can be used to transform tabular data.

Apply Webgrid Pagination to a table

My question is simple. MVC3 has a Webgrid Helper which can be used for paging.
Is there a way to use this helper in a table instead of using the webgrid?
Please advise me in this.
The Pager helper needs a WebGrid to work. If you do not want to use the WebGrid, you can create your own paging links. This article explains how, although it is based on the Web Pages framework and shows how to use paragraphs instead of tables: http://www.mikesdotnetting.com/Article/150/Web-Pages-Efficient-Paging-Without-The-WebGrid
However, if you want to display your results in a table, I don't know why you don't use the WebGrid. It renders a table.

Resources