CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 CCS GRID: After Execute Select event

Print topic Send  topic

Author Message
DaveK
Posted: 07/28/2003, 9:58 PM

The After Execute Select event is raised after the grid data source's rows
selection query has been executed and a recordset for the result is
returned.

How is the data in the recordset rows referenced in the event? ie.
Recordset.Fields.Field1 ?


DonB
Posted: 07/29/2003, 6:07 AM

You must reference controls in a row through the BeforeShowRow event,
otherwise the recordset will probably be pointed at the last row (the grid
steps through each row of the recordset as the grid is assembled and the row
cursor winds up at the last row) and you won't see the values from the row
you want in any other event.

When you add this event (e.g., Events, "Add Code") you will notice the
function it creates contains the correct reference:
gridname_BeforeShowRow(). If you have a textbox named TextBox1 in the row,
then use gridname.Textbox1.Value (ASP).

DonB


"DaveK" <info@dksy.net> wrote in message
news:bg4uu2$7td$1@news.codecharge.com...
> The After Execute Select event is raised after the grid data source's rows
> selection query has been executed and a recordset for the result is
> returned.
>
> How is the data in the recordset rows referenced in the event? ie.
> Recordset.Fields.Field1 ?
>
>
>

DaveK
Posted: 07/29/2003, 10:00 AM

Don,
Thanks for the reply.
What I'm trying to is rotate the data clockwise by 90 degrees.
The rows in the database contain the following fields: fDate, fField1,
fField2
7/28/03, Chair, Dave
7/28/03, Speaker, John
....
8/4/03, Chair, Jane
8/4/03, Speaker, Bill

I need to display the information in columns in the Grid e.g.
7/28/03 8/4/03
Chair Dave Jane
Speaker John Bill
....

Dave
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:bg5rib$e4a$1@news.codecharge.com...
> You must reference controls in a row through the BeforeShowRow event,
> otherwise the recordset will probably be pointed at the last row (the grid
> steps through each row of the recordset as the grid is assembled and the
row
> cursor winds up at the last row) and you won't see the values from the row
> you want in any other event.
>
> When you add this event (e.g., Events, "Add Code") you will notice the
> function it creates contains the correct reference:
> gridname_BeforeShowRow(). If you have a textbox named TextBox1 in the
row,
> then use gridname.Textbox1.Value (ASP).
>
> DonB
>
>
> "DaveK" <info@dksy.net> wrote in message
>news:bg4uu2$7td$1@news.codecharge.com...
> > The After Execute Select event is raised after the grid data source's
rows
> > selection query has been executed and a recordset for the result is
> > returned.
> >
> > How is the data in the recordset rows referenced in the event? ie.
> > Recordset.Fields.Field1 ?
> >
> >
> >
>
>

DonB
Posted: 07/29/2003, 3:22 PM

I see. swapping rows for columns is always a problem. One way is with an
"identity matrix" and a SELECT that facilitates the "rotation". Joe Celko
gives a good explanation in his book "SQL for Smarties". Here's a glimpse:
http://www.dbmsmag.com/9608d06.html It works, but it has the drawback of
being fairly cumbersome.

Another approach is an XML/XSL transformation, which I've looked at briefly
but haven't got a solution yet - at least not a general one. I'm looking at
that as time permits and if I get it in a form that can be applied generally
to any record set, I'll post it. This would be a really slick way to do
what you are trying to do, and I find it is something that comes up pretty
often so I would like an easy way to do this in arbitrary cases.

DonB


"DaveK" <info@dksy.net> wrote in message
news:bg697k$vi$1@news.codecharge.com...
> Don,
> Thanks for the reply.
> What I'm trying to is rotate the data clockwise by 90 degrees.
> The rows in the database contain the following fields: fDate, fField1,
> fField2
> 7/28/03, Chair, Dave
> 7/28/03, Speaker, John
> ...
> 8/4/03, Chair, Jane
> 8/4/03, Speaker, Bill
>
> I need to display the information in columns in the Grid e.g.
> 7/28/03 8/4/03
> Chair Dave Jane
> Speaker John Bill
> ...
>
> Dave
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:bg5rib$e4a$1@news.codecharge.com...
> > You must reference controls in a row through the BeforeShowRow event,
> > otherwise the recordset will probably be pointed at the last row (the
grid
> > steps through each row of the recordset as the grid is assembled and the
> row
> > cursor winds up at the last row) and you won't see the values from the
row
> > you want in any other event.
> >
> > When you add this event (e.g., Events, "Add Code") you will notice the
> > function it creates contains the correct reference:
> > gridname_BeforeShowRow(). If you have a textbox named TextBox1 in the
> row,
> > then use gridname.Textbox1.Value (ASP).
> >
> > DonB
> >
> >
> > "DaveK" <info@dksy.net> wrote in message
> >news:bg4uu2$7td$1@news.codecharge.com...
> > > The After Execute Select event is raised after the grid data source's
> rows
> > > selection query has been executed and a recordset for the result is
> > > returned.
> > >
> > > How is the data in the recordset rows referenced in the event? ie.
> > > Recordset.Fields.Field1 ?
> > >
> > >
> > >
> >
> >
>
>


   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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