CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Help with editable grid event

Print topic Send  topic

Author Message
Frank Rocco
Posted: 07/11/2003, 11:23 AM

Hello,

I have a checkbox on a editable grid.
When a user checks the box, I want to assign their session userid to a
hidden field that is also on the grid, this can happen for several records.
How is this done?

The checkbox is a field to approve a document.
If the document is checked for approved, I want to assign the
session("UserID") to the approved_by field before update of each row.

I tried this, but it did not work.

if ($tbldocument_users->approved->GetValue() == 1) {
$tbldocument_users->approved_by->SetValue(CCGetSession("UserID"));
}

Thanks

Frank

DonB
Posted: 07/11/2003, 2:31 PM

If I understand the problem correctly, you want to select one or more
records (via a checkbox) and perform an update to the database of those
rows, inserting one particular userid into all of the rows being updated.

I would use a Custom Update to do this. Click the "..." in the Property
page while you have selected the editable grid control, The dialog box that
pops up will probably show all the database fields being already updated.
If not, add the ones you need.

Now, add the userid field and obtain the data value from a type "Session"
with the value "UserID". That is where the logged=in userid is kept by CCS
(you might verify the session variable name under the Project Options
Security dialog as this is something you might have changed to different
value than what I indicated).

There you go, the userid gets stored in all the records that were marked
with a checkmark.

DonB


"Frank Rocco" <farocco@hotmail.com> wrote in message
news:bemvbe$lsm$1@news.codecharge.com...
> Hello,
>
> I have a checkbox on a editable grid.
> When a user checks the box, I want to assign their session userid to a
> hidden field that is also on the grid, this can happen for several
records.
> How is this done?
>
> The checkbox is a field to approve a document.
> If the document is checked for approved, I want to assign the
> session("UserID") to the approved_by field before update of each row.
>
> I tried this, but it did not work.
>
> if ($tbldocument_users->approved->GetValue() == 1) {
> $tbldocument_users->approved_by->SetValue(CCGetSession("UserID"));
> }
>
> Thanks
>
> Frank
>
>

Frank Rocco
Posted: 07/11/2003, 7:56 PM

Don, this is not working for me.
I cannot use Javascript in the "Before Update" event.

<script language="JavaScript">
articles.article_desc.value = obj1.getContentBody()
</script>

ASP complains:

Technical Information (for support personnel)

a.. Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/portal/EditArticle_events.asp, line 14
<script language="JavaScript">

Thanks
Frank

"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:benabb$4po$1@news.codecharge.com...
> If I understand the problem correctly, you want to select one or more
> records (via a checkbox) and perform an update to the database of those
> rows, inserting one particular userid into all of the rows being updated.
>
> I would use a Custom Update to do this. Click the "..." in the Property
> page while you have selected the editable grid control, The dialog box
that
> pops up will probably show all the database fields being already updated.
> If not, add the ones you need.
>
> Now, add the userid field and obtain the data value from a type "Session"
> with the value "UserID". That is where the logged=in userid is kept by
CCS
> (you might verify the session variable name under the Project Options
> Security dialog as this is something you might have changed to different
> value than what I indicated).
>
> There you go, the userid gets stored in all the records that were marked
> with a checkmark.
>
> DonB
>
>
> "Frank Rocco" <farocco@hotmail.com> wrote in message
>news:bemvbe$lsm$1@news.codecharge.com...
> > Hello,
> >
> > I have a checkbox on a editable grid.
> > When a user checks the box, I want to assign their session userid to a
> > hidden field that is also on the grid, this can happen for several
> records.
> > How is this done?
> >
> > The checkbox is a field to approve a document.
> > If the document is checked for approved, I want to assign the
> > session("UserID") to the approved_by field before update of each row.
> >
> > I tried this, but it did not work.
> >
> > if ($tbldocument_users->approved->GetValue() == 1) {
> > $tbldocument_users->approved_by->SetValue(CCGetSession("UserID"));
> > }
> >
> > Thanks
> >
> > Frank
> >
> >
>
>

DonB
Posted: 07/11/2003, 9:57 PM

But you don't need to write any code that I can see. That is the beauty of
the custom update (not an event, it's on the property page for your Editable
Grid). Just fill in the columns to update from the form, then add the
userid and retrieve the data value from the session variable named "UserID".
CCS writes the code for you.

Or have I missed your objective altogether? I am wondering how you got onto
writing javascript. Are you trying to do something on the browser side? I
was describing server-side functionality.

DonB


"Frank Rocco" <farocco@hotmail.com> wrote in message
news:bentdi$rla$1@news.codecharge.com...
> Don, this is not working for me.
> I cannot use Javascript in the "Before Update" event.
>
> <script language="JavaScript">
> articles.article_desc.value = obj1.getContentBody()
> </script>
>
> ASP complains:
>
> Technical Information (for support personnel)
>
> a.. Error Type:
> Microsoft VBScript compilation (0x800A0400)
> Expected statement
> /portal/EditArticle_events.asp, line 14
> <script language="JavaScript">
>
> Thanks
> Frank
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:benabb$4po$1@news.codecharge.com...
> > If I understand the problem correctly, you want to select one or more
> > records (via a checkbox) and perform an update to the database of those
> > rows, inserting one particular userid into all of the rows being
updated.
> >
> > I would use a Custom Update to do this. Click the "..." in the Property
> > page while you have selected the editable grid control, The dialog box
> that
> > pops up will probably show all the database fields being already
updated.
> > If not, add the ones you need.
> >
> > Now, add the userid field and obtain the data value from a type
"Session"
> > with the value "UserID". That is where the logged=in userid is kept by
> CCS
> > (you might verify the session variable name under the Project Options
> > Security dialog as this is something you might have changed to
different
> > value than what I indicated).
> >
> > There you go, the userid gets stored in all the records that were marked
> > with a checkmark.
> >
> > DonB
> >
> >
> > "Frank Rocco" <farocco@hotmail.com> wrote in message
> >news:bemvbe$lsm$1@news.codecharge.com...
> > > Hello,
> > >
> > > I have a checkbox on a editable grid.
> > > When a user checks the box, I want to assign their session userid to a
> > > hidden field that is also on the grid, this can happen for several
> > records.
> > > How is this done?
> > >
> > > The checkbox is a field to approve a document.
> > > If the document is checked for approved, I want to assign the
> > > session("UserID") to the approved_by field before update of each row.
> > >
> > > I tried this, but it did not work.
> > >
> > > if ($tbldocument_users->approved->GetValue() == 1) {
> > > $tbldocument_users->approved_by->SetValue(CCGetSession("UserID"));
> > > }
> > >
> > > Thanks
> > >
> > > Frank
> > >
> > >
> >
> >
>
>

Frank Rocco
Posted: 07/12/2003, 7:12 AM

Hi Don,

Sorry, t two different issues.
I'll look for the editable grid update you suggested, thanks I did not know
about that.

The other one is on the browser side, the html editor I am using,
(yusasp.com) editor that uses javascript to pull the info from the editor
and put it into a database field or take from a database field and put it
into the editor.

Thanks

Frank
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:beo4f8$486$1@news.codecharge.com...
> But you don't need to write any code that I can see. That is the beauty
of
> the custom update (not an event, it's on the property page for your
Editable
> Grid). Just fill in the columns to update from the form, then add the
> userid and retrieve the data value from the session variable named
"UserID".
> CCS writes the code for you.
>
> Or have I missed your objective altogether? I am wondering how you got
onto
> writing javascript. Are you trying to do something on the browser side?
I
> was describing server-side functionality.
>
> DonB
>
>
> "Frank Rocco" <farocco@hotmail.com> wrote in message
>news:bentdi$rla$1@news.codecharge.com...
> > Don, this is not working for me.
> > I cannot use Javascript in the "Before Update" event.
> >
> > <script language="JavaScript">
> > articles.article_desc.value = obj1.getContentBody()
> > </script>
> >
> > ASP complains:
> >
> > Technical Information (for support personnel)
> >
> > a.. Error Type:
> > Microsoft VBScript compilation (0x800A0400)
> > Expected statement
> > /portal/EditArticle_events.asp, line 14
> > <script language="JavaScript">
> >
> > Thanks
> > Frank
> >
> > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> >news:benabb$4po$1@news.codecharge.com...
> > > If I understand the problem correctly, you want to select one or more
> > > records (via a checkbox) and perform an update to the database of
those
> > > rows, inserting one particular userid into all of the rows being
> updated.
> > >
> > > I would use a Custom Update to do this. Click the "..." in the
Property
> > > page while you have selected the editable grid control, The dialog
box
> > that
> > > pops up will probably show all the database fields being already
> updated.
> > > If not, add the ones you need.
> > >
> > > Now, add the userid field and obtain the data value from a type
> "Session"
> > > with the value "UserID". That is where the logged=in userid is kept
by
> > CCS
> > > (you might verify the session variable name under the Project Options
> > > Security dialog as this is something you might have changed to
> different
> > > value than what I indicated).
> > >
> > > There you go, the userid gets stored in all the records that were
marked
> > > with a checkmark.
> > >
> > > DonB
> > >
> > >
> > > "Frank Rocco" <farocco@hotmail.com> wrote in message
> > >news:bemvbe$lsm$1@news.codecharge.com...
> > > > Hello,
> > > >
> > > > I have a checkbox on a editable grid.
> > > > When a user checks the box, I want to assign their session userid to
a
> > > > hidden field that is also on the grid, this can happen for several
> > > records.
> > > > How is this done?
> > > >
> > > > The checkbox is a field to approve a document.
> > > > If the document is checked for approved, I want to assign the
> > > > session("UserID") to the approved_by field before update of each
row.
> > > >
> > > > I tried this, but it did not work.
> > > >
> > > > if ($tbldocument_users->approved->GetValue() == 1) {
> > > > $tbldocument_users->approved_by->SetValue(CCGetSession("UserID"));
> > > > }
> > > >
> > > > Thanks
> > > >
> > > > Frank
> > > >
> > > >
> > >
> > >
> >
> >
>
>


   


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

MS Access to Web

Convert MS Access to Web.
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.