Using ag-grid groupRemoveSingleChildren with SSRM - ag-grid

I'm using ag-grid with server-side mode for retrieving data from the backend. I would like to use groupRemoveSingleChildren option so there would be no need to expand if only one row available. However I'm wondering if it's even possible for non client-side model, how would it suppose to know that only one row available? I've tried to use getChildCount() but it doesn't seem to be related. Thanks in advance

Related

How get apigility JSON and put in autocomplete of jquery ui

I facing a huge problem here i have a zf apigility as my backend and a simple dropdown in my front-end, and i want to get all the results of REST in apigility URL and put as autocomplete in my dropdown, but my problem is that i have about 72,000 register in database :/ some advices ?
thanks
Two concepts you need to include in your autocomplete endpoint.
Filtering and Pagination.
First and foremost, I'd decide on a sensible minimum number of characters before returning results. 2? 3? Whatever works for you.
Secondly, don't return EVERY result, return only the first page (page size is up to you, 20? 50? however many is acceptable to you).

Looking for a “light” gwt framework with a rich-featured grid

I'm looking for a gwt framework with a grid that can handle more than 500.000 rows and has features like filtering, sorting, basic events (click, double-click), multi selection, auto save, bulk save, etc. I was looking at sencha and smartGWT, but they seem a bit heavy.
Could you recommend anything?
tia
Have a look on PWT, we built this framework to be as lightweight as possible.
All the features that you need are almost availabe.
But to be honest, I'am not sure that you must edit 500 000 rows on a single page, A so huge amount of data will cause memory and performance issues.
You can see the TableEditor on the sample Contacts Table : http://pwt.putnami.org/#!ContactsTable
Regards.
You can use pure GWT for your app. Here is an example of a DataGrid widget:
http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwDataGrid
Note that there is no need to load all data into the browser. You can use an asynchronous data provider and offer different filtering, sorting, search, etc. options to your users. And you always show only the first 20/50/100 results to a user.

Displaying web based visualisation or graphing of data based on a postgresql database?

I am working on a web application for a client that uses a postgresql database. I want the client to be able to go to a certain area of the site where the data from the database is displayed in graph form (for example, sales figures over a 6 month period). Is there a plugin I could use for this (I don't have any experience of this, so an easy one, or one with tutorials available would be great). I had a look at BIRT, which says it has a web based option but I couldn't really figure it out. I don't want the client to have to download and go through another program, I just want them to go to a url within their site, and it's all just presented to them there and then.
Any sort of pointers in the right direction would be greatly appreciated.
Thank you.
HighCharts, at http://www.highcharts.com/, works well for this case -- I use it fairly often. It supports Ajax data feeds in JSON format, so you can write an endpoint which returns the JSON representing the data from Postgres and which gets called from a JavaScript function which creates the graphs using that data (you would place that call in a ready function).
Also, if you're using Postgres 9.3 or higher, it supports JSON natively, so you can do the JSON conversion in the SQL query itself, as opposed to post-processing the results in your Python or other backend code.
Highcharts is reasonably flexible and allows for a variety of nice-looking, functional charts and graphs. If you want to get much fanicer, d3 may be worth a look. These are some the types of graphs/charts it can do: https://github.com/mbostock/d3/wiki/Gallery
I have not used d3 myself, however.
For the scenario you described above, Highcharts seems like it would work just fine.
It's been a while, and a lot has happened since 2016. There is now ChartJS as well - http://chartjs.org/, for example, which is easier to use than HighCharts and very flexible (I've used both).
What they both don't do is dynamic data. If you want that your client decides which data he wants to watch - that part you need to write yourself.

Scala Play Framework - Dynamic Forms

I'm currently in the process of trying to define a dynamic form in Play (Scala). What I mean by a "dynamic" form is one which presents different form elements (and POSTs different data) depending on the state of some runtime (specifically database-side) data.
A brief illustrative example: on a to-do list application, how could one create a form which creates a "delete" check box next to each of the list elements? I realize this could be done with GET links or with AJAX/javascript, but I want this to be a standard POST form with a "submit" button.
I'm aware of the repeated mapping form functionality, but is it possible to define an even more dynamically generated form, where the structure is less strict than just single+repeated elements?
Thanks for any suggestions you might have. I realize this might just be more than POST is cut out for.
The closest thing that I have to an answer for this is that POST and any sane web framework supports "array" inputs. Hence, if you can get your data into any regularized format, you can serialize/deserialize via that. You may be able to support semiexotic data patterns by using this method as well.

Umbraco: Storing spatial data

I'm researching Umbraco for use as a base in a large CMS project, however the project calls for the SQL Server 2008 database to store spatial data against content.
Being new to Umbraco I'm still reading through the documentation and slowly building up an idea of it's architecture. However so far it doesn't look like Umbraco supports the storage of spatial data.
There only appears to be four database datatype options: date, integer, ntext, nvarchar
Is it possible to store spatial data to the database?
Update: Futher research into how Umbraco works has showed me I was on the wrong track. It seems the way to do this is store the lat/long data in the data inside the usual XML format Umbraco uses.
Then to use the Spatial.net extensions that have been built on top of Lucene.net, rather than use the limited search capabilities Examine exposes.
However this is all still theoretical, I've just not been able to achieve this. If I do before someone answers this question, I'll post my findings here to help others.
You could take a look at how to make user controls (with Visual Studio) in Umbraco.
It is also possible the versatility in Umbraco 'Document Types' is enough for you.
It is possible to extend Umbraco in any sort of way to get the solution you want. I don't know how you want the spatial data to interact with your frontend - so it is difficult to provide a direct solution.
Although there are ways to store spatial data and perform queries against it using Spatial.net, it's not a very elegant solution.
Instead I've created an additional table in SQL Server 2008 with the geometry/geography datatype and a reference to the Umbraco content it's connected with.
I've then got a event hook which updates this whether content is added/updated/deleted.