CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Grid simplification (urgently needed)

Suggest new components/features

by seanwebb » 24 Sep 2012 18:37

In addition/supplemental to my previous posted suggestion....
http://www.cgdevtools.com/forum/suggestions/iwcgjqgrid-jqgridsoption-automovedatasetboolean-new-property/

Editing of data in a grid whether using the provided Edit/Add/Delete icons in the grid navigator or direct cellediting is a rather lengthy and tedious process to get right, that could be achieved in a much more concise manner (although with some increase in web-traffic , but this would be the developers choice)

With the automovedataset feature the grid coding would be simplified because it would bypass/not need the settings detailed below when in this mode.
The need for the grid column.key setting and the need for unique key values within a grid to edit/modify data would be obviated.

Simplification Effect
============
1) The grid columns key property would not need to be set=true for key columns
2) The grid key columns order would not need to be the same as the fields within a key (where a key comprises of more than 1 field
3) No need to add,then hide columns for keys fields that are not actually needed in the grid for display purposes, but for retrieving data

4) no need to write the following code for each and every user button relating to a specific row on data within a grid
cKeyValue:=myGrid.JQGridOptions.SelRow;
if cKeyValue'' then
TIWCGJQGridDataSetProvider(myGrid.JQGridProvider).DataSet.locate('myfieldfield',cKeyValue,[]);

5) The grid navigator edit/delete / incelledit functions would not need to do the equivalent of 4) above
to retrieve data (using the columns.key properties to determine which columns to pass to the locate)

6) ttable descendants with non unique keys will be automatically handled (which currently cannot be handled by the grid component other than for display only purposes)

Simply put, if each time the user clicked on a new row in a grid the dataset was moved/synched accordingly to the dataset
then to edit/delete a row , it would simply be necessary to set the dataset in dsedit mode.
no locate required,no key columns,no hidden columns

In this scenario , the user can simply add the columns they wish in the order they wish.

Any missing field key required for inserts can be handled by the dataset onbeforepost event

In this way grids with minimal coding but with full modification capabilities could be placed on a web page
seanwebb
 
Posts: 50
Joined: 22 May 2012 11:12

by Jorge Sousa » 24 Sep 2012 19:40

Hi Sean

We can consider add an AutoMoveDataSet property, and Edit / Delete the current DataSet using cursor position.

because existing IW grids have this method,

but we would never suggest to use at all, because not only increases web traffic, but also the server for no reason. The DataSet should be located or the cursor moved, only when the web app needs it for another operation, like a custom edition, and not everytime a user selects a row.

This is a method that works well in Intranets with a small number of users, but not in Internet and a substancial number of users.

Best Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 24 Sep 2012 20:48

But how we can avoid


1) The grid columns key property would not need to be set=true for key columns


if not key columns are set, the provider uses the DataSet.KeyNo property, which is slower most of the times

Best Regards

cgdevtools
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.