Blog

HTMLGrid for Windows Applications - Part #1

JQGrid/JQuery

During this years North American User Group we presented an alternate to the standard Uniface Client/Server grid control using a web based grid inside of the Uniface HTML control.

The grid uses a JavaScript library, JQGRID/JQUERY to render data in a style similar to a classic window or client/server control.

Following the user group we had a number of requests for more information so we decided to use this as an opportunity to start a blog series on that subject and in the process get feedback from our user base and gain insight on what can be done with this powerful and flexible control.

The purpose of this is not to replace the regular grid but to explore web/JavaScript technologies and how they may be incorporated into Uniface. Over recent years these libraries have advanced to the point where the features and abilities equal, and in some cases surpass, features available to windows based controls making it possible benefit from these advances within traditional Uniface applications.

This is the first in a series of articles based around JQGRID but JQgrid is only one of many and if sufficient interest occurs perhaps in the future we will expand the series to include others but first we need to describe the basics and from there expand to encompass the full range of features.

A key part of this integration is to try and keep within the concepts and usage of the grid as used within a regular web page and not place too much emphasis on making it perform exactly like C/S grids although there are obvious similarities.

JQGRID was created by Tony Tomov at Trirand Inc. who maintains a blog http://www.trirand.com/blog/  where you can download the latest versions and if you wish purchase support for commercial projects. Having said that JQgrid is open source and available for free without support although Tony's free blog is a rich source of questions and answers. The list of features is truly impressive and can be best visualized by visiting the demonstration site http://trirand.com/blog/jqgrid/jqgrid.html

One thing of note is that even though this grid is web based and normally driven via a webserver we recognize that such a requirement is not a part of windows based applications. For that reason we have introduced techniques to eliminate that requirement and interface directly with the application via the "extended-trigger" trigger and the direct use of the local file system for grid resources. We have tried to keep the use of JavaScript to a minimum although to gain maximum use  of these techniques  a familiarity with JavaScript and in particular the JQUERY library is a must.

A part of this will be to provide discrete samples within Uniface.info's samples area for download and I've created a more detailed document that tries to explain some of the grids working in detail.

The focus of this first session is on data retrieval (read only) and in the next session we will deal with editing data. Beyond that we will touch on topics like field formatting including themes,  sub-grids, grouping and a host of other features. Take a look at the HTMLgrid part1 sample and also the more detailed explanation and remember I'm hoping that this is a two-way-street so feel free to question, adjust and improve the samples especially if you find a better way to do things.

3 Comments

  1. Hi George, looks promising. Think the interesting part is to synchronise data in a mixed mode component (where the HTMLwidget is just one among others, perhaps a "Detail view" on a multi-occurence Form. A Happy New Year, Uli
  2. Hi Uli, Happy new year to you also. Interesting idea although each HTML container is separate so creating a pubsub across instances  could be a challenge. I'll think about it unless of course you have a solution maybe?
  3. for a proof-of-concept I created in late 2012, see my screencast 140114-dynamicHTML.zip which can be downloaded from www.uli-merkel.de