Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activate Cell in a grid

Status
Not open for further replies.

rohbe

IS-IT--Management
Aug 30, 2001
76
0
0
US
I have a form with a grid that whenever the row in it is changed specific cells in the row are saved prior to going to the new row. The code uses an ActivateCell to change to that cell and then saves the .Value of that cell.

1. Is this the best way to do this.

2. The ActivateCell seems to play havoc with the scrolling function as to which columns I can select to scroll down. Is there any good documentations as to what the ActivateCell does.


Thanks, much
Jean
 
I think you should try to save something like :
save1 = thisform.thisgrid.thiscolumn.text1.value
save2 = thisform.thisgrid.thiscolumn.text2.value
....
save3 = thisform.thisgrid.thiscolumn.text3.value
It's much faster! because you don't go into the cell you just explicitlly take its value. Your way it's time consuming...

Hope it saves you
By
 
It doesn't because the code is in a grid class and the column name or the text field name can be different in different instances of the class.

thisform.thisgrid.thiscolumn.text1.value

Text1 may not be the name of the text field.

Hope this makes sense.

Thanks for your reply

Jean
 
If your record source is a table/cursor/view, than you should try to keep your presentation layer separate from your data layer.

In essence, if you save a record, save the record in the table without having to reference any control in the grid.

HTH,
Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
This code occurs in a User Defined Class called LOOKUP. Lookup takes in a query string and a list of fields to return from the Lookup. The cursor is created in the INIT code of the LOOKUP class and as such the cursor is closed when the instance of the Lookup class is closed.

Is there something wrong with this type of design as far as presentation/data layer architecture.

Jean
 
As I understand, you are querying the values of your controls and save those values (into a table ?).
If you are saving them into a table, why not save the record itself if you have the control sources set.

Are you saving those values to a table ?

HTH,
Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
Thanks for your patience. Let me try to explain this:

I have a set of basic controls for the application - one of them being a LOOKUP function. The Lookup function input is a Query String i.e. "SELECT * FROM customers" and a single or multiple list of values from the table to return.

The user sees the LOOKUP form and select the row and the values that are selected are returned back to the application.

The problem is that I can not find a whole lot of data on what the Activatecell does - because it seems to have some side effects to scrolling properly. I think the simple solution is to save the data only after the user finalizes the selection - I am not sure why the programmer chose to do each time the row was changed.

Thanks much for your assistance.

Jean
j_scofield @rohbe.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top