Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interactive Change of Grid Data Source
Message
From
11/12/1998 08:55:16
 
 
To
10/12/1998 16:30:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00165073
Message ID:
00166508
Views:
8
>>>>I just meant that Select-SQL creates read-only cursor by definition. Do you want to edit directly in grid?
>>>
>>>Yes - if possible.
>>
>>It's possible, but , unfortunately, it's not recommended, because of some grid quirks if you want to validate each row before jumping to another one. However, you may always convert read-only cursor to read-write. Also, you may cosider parameterized view here.
>
>The cursor was read-write and still I could not edit in the grid.

If gird recordsource is read-writeable then you may edit in grid unless you set grid.readonly=.T.

>I had not progressed to the point of worrying about validation. I had some vague idea about validating all changes to all children at one time on lost of focus from the grid.

This case you may use table-buffered view as grid.recordsource

>However if the grid is not suitable for editing directly what is it good for?
>
>If you are going to popup an editing screen from the grid to make changes why not just use a listbox?

Grid looks much better then listbox, allows more UI choices, and most important can work with big number of rows.

>I have not yet found a reliable way to highlight the complete row of the grid. If you highlight only a single field of the grid that seems to tell the user that the field can be edited.

This is job for DynamicBackColor property. You may SetAll them the same way for all grid.columns.

>I am converting a 2.6 application. My users in it see popups when they try to edit children in a browse screen, so it will not be a problem to do it this way.
>
>I also will have no problem opening the cursors in the DE. It just seemed more OOP to handle the data from the child list class and not to have to add the cursors to the DE.

I don't think so. DE is OO-way to handle data. That's another story that any object may have properties (controlsource in simplified case) which tells what DE.Cursor will be used by this object.

>I did find a way to permit editing in the Grid suggested by Mike Feltman. That is to make a grid for each child cursor and alternately hide and show them based on the selection made by the user in the combo box. I had to open the cursors in the DE for it to work and I am still working on the validation. However I feel this will be a deadend for me based on the effort it would involve. Most of the children cusors would need to be edited from a popup screen anyway, for other reasons.

I wonder, that many hide/show, i.e. overlapped grids will choke your form.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform