CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Access underlying fields in grid

Print topic Send  topic

Author Message
steve02125

Posts: 1
Posted: 04/22/2004, 11:45 AM

If I base a grid on table and only display maybe 3 of 10 fields on the grid, do I have access programmatically at the row level to those other fields? Like maybe:

mygrid.field.value or
mygrid.recordset.field.value or
mygrid.recordset("field").value

or something like that?

Thanks
View profile  Send private message
peterr


Posts: 5971
Posted: 04/22/2004, 12:03 PM

I think that it depends on when and where you'd like to access these fields.
The pages/scripts are executed in 2 stages. First the page is using the SELECT statement to populate the form fields and display the form. Here it may be possible to utilize such fields, for example within the Before Shown event (I don't know if this will work for sure or how but can find out).
However when the users enter some information and submit the page then the script is executed second time and it no longer uses the SELECT statement. It only reads the values submitted through the form, therefore if something doesn't get submitted and doesn't exist within the form then ther is no way to access it. Therefore those fields canot be accessed in Before Insert, After Update and similar events.

BTW, are you asking about the editable grid, or just the regular grid that only displays and doesn't submit values?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Steve
Posted: 04/23/2004, 5:33 AM

I am talking about the regular grid. I know I can make another request to the database and get the fields I need and make whatever string manipulations I need in the before show event, but thought maybe I could just make one request and get all the fields I need.

Thanks
peterr


Posts: 5971
Posted: 04/24/2004, 8:47 PM

This worked OK for me in the Before Show Row event of the Grid:
FormName.Label1.Value = FormName.RecordSet.Fields(0)
and
FormName.Label1.Value = FormName.RecordSet.Fields("field_name")

(Note: FormName and Label1 were the form and label names in my test page)

I hope this is what you were looking for.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.