3.2.0

Edit contents of grid in text input areas

Hi,

I am working on the early stages of a GPL project (http://avoir.uwc.ac.za/projects/ewage) and would like to use the Grid control in my pages.

I realise that the 'on-grid' editing functionality is not available yet so would like to try and implement the following:

--------------------
Display a grid with data in.

Editing existing rows:
When a row is selected, display the contents of the row in input boxes below the grid. The user is allowed to edit the text boxes and save the contents, at which point the grid is updated. The user should also be able to cancel an edit and the changes to the grid are not 'committed'.

Adding new rows:
The user clicks 'add new' button. The currently selected row on the grid (if any) is un-highlighted and the input boxes are cleared. The user fills in the input boxes and clicks save button. The new data is added to the grid. Alternatively the user clicks cancel and the text input boxes are cleared.

Deleting rows:
The user selects a row and clicks the delete button. The row is deleted.
------------------

Has anyone done this sort of thing?

I am new to these widgets and would really appreciate it if someone could share an example with me (I also try to hold down a 'normal' job so time is of the essence here ;-)

Regards

Justin
Justin
February 2,
This sample could help.
http://www.activewidgets.com/messages/2732-4.htm
Carlos
February 2,
Thanks Carlos

I will look at your code on the weekend - when I can download it onto my PC. For now I have implemented a minimal solution using javascript which I would be willing to share with anyone.

I have however run into a few minor problems:
1) Scrollbar obscuring last column when new rows are added http://www.activewidgets.com/messages/3228-0.htm

2) Remove row selection:
http://www.activewidgets.com/messages/3229-0.htm

A further question relates to the API available. Where can one find the complete API - e.g. the properties of the grid that can be set. I have checked out the reference but this does not seem to be complete.

e.g. grid.setProperty("selection/multiple", true);

Thanks
Justin
February 3,

This topic is archived.

See also:


Back to support forum