client side datatable pagination - liferay-6

Am using Alloy UI data table and i have client side pagination. Alloy ui data table has inbuilt pagination and am using it. is there any way to customize its style and things. for example, if we enable pagination, it will provide "page Sizes" and "first, previous, next, last" links and provision to go to pages which i doesn't want.I have uploaded the default data table pagination image and the one i need .
Default
Needed
How to achieve this?

ike you said, we had a similar requirement. Preferred using AUI DataTable along with Jquery pagination plugin.
Here I attached the Link for JQuery opensource plugin for pagination. Its easy to use.

Related

Grafana Panel Plugin Load data on demand (click event)

I am working on a customized panel plugin where I need to show data and provide a drill down functionality. My environment would be
React Panel
Grafana 6.5.3
InfluxDb as datasource
What I want to achieve is
Initial set of data will be loaded from influx query (That part is pretty much clear how to do).
The customized panel have some clickable items and on click I need to load additional data (based on selection), I am not sure how this part can be achieved and what is best way to communicate with data source (influxDb in my case) from panel plugin. I see eventBus 1, perhaps this is the way to communicate with outer world, but couldn’t find any significant help from documentation.
Any sort of help/pointer is appreciated, or example opensource plugin which is already doing such stuff.

Ag-Grid. How to send slots to "ag-side-bar"?

I have a tool panel and I want to send slot (e.g. <h1>Edit table columns</h1>) to above of the search input. Is there any way to do this?
Unfortunately at this time there's no way to inject HTML inside the standard columns tool panel.
If you'd like to do that you'll have to build your own tool panel component and use that instead of the default column tool panel. You can do that using the approach described here:
https://www.ag-grid.com/javascript-grid-tool-panel-component/

Realtime datatable with asp.net core web app , EF core and SignalR

I want to retrieve data from Sqlserver database with EntityFramework core and do crud operations and show data table to client without refreshing the page (Realtime) , is there any source or example in this case ?
Not sure there is a definitive source for this, but it's not that hard to build yourself.
It should be relatively straight forward. In general you'd need
A model for the grid that defines the properties to show and edit, and also which row is selected.
An HTML Helper to change the rows from read-only to editable
A view to display the table.
An [edit] action link for each row enables you to select a row by ID for editing, and after clicking it, reloads the page and then the view can respond accordingly to change the type of the row from read-only to editable.
You could use Blazor or maybe Ajax to change a row from read-only to editable without refreshing the page, but I'm not sure if you need to meet certain requirements that discard using either of them.
John Ciliberti has written a recipe for a book, that works just like I described, find it on his Github page to get some ideas of what's involve.
If you need a more out-of-the-box solution, perhaps consider wiring up DataTables.js.

dojox.grid.DataGrid is not displaying properly

I am trying to use dojox.grid.DataGrid and dojox.data.JsonRestStore.
Somehow the data grid is not displaying properly.
What surprised me is clicking the Run button at the dojo document side :
http://dojotoolkit.org/reference-guide/1.9/dojox/grid/DataGrid.html
all these examples are displaying data grid properly.
Does anyone know what's going on the dojo grid?
All the examples given in dojo datagrid are working because they are providing local data. If you want to use it in your project then u have to implement a web service that provide remote data in json format as mention in documentation regarding jsonrest store.
Click Here

Creating a Calendar in Symfony

I'm using symfony 1.4 for my web project.
I have the following problem (or opportunity): I need to create a calendar where the "common" user has only the ability to see (or read) the date and time of the events and the "admin" user can edit, add and remove new events. So it's basically a google calendar type of thing where I have to different permissions, read and read, write, delete.
Also I need to be able to fully customize a calendar style so that It matches my css.
How would your approach this problem? I've been trying to find the best plugin for this endeavor but I haven't found one that with a good documentation
Thanks in advance!
I recommend FullCalendar jQuery plugin. It gives you very nice JavaScript calendar with drag&drop support. You can use your own CSS style.
On the server side create symfony actions that will return data to FullCalendar API. Just serialize the data to JSON Event Object.
Of course you should use symfony security component to restrict read/write access. Show only those events that users should be able to see. And don't let them access write actions if they don't have write permission.
To manage event data you can either create backend admin module or display your own form when user click on calendar (like Google Calendar does). If you like the second approach then you have to handle it in JavaScript.
I would suggest to build 2 applications for that.
frontend (read/see)
backend (admin)
Just go with the normal symfony approach.. define your models, generate frontend (inkl. modules). There you can adjust you templates and css.
Practicle open book where you can choose the topics you need
Then use the admin-generator to get the backend application. You can customize behaviours and styling of course.