CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Hide Editable Grid Buttons

Print topic Send  topic

Author Message
DataDoIt
Posted: 04/05/2004, 3:04 PM

CCS2; PHP4; MySQL

I'm attempting to hide the Submit and Cancel buttons on an Editable Grid
when there are no records to display. The sample below isn't working for
me:

------------------------------------------------------
//tblSchoolContacts_BeforeShow @622-29C67EE8
function tblSchoolContacts_BeforeShow()
{
$tblSchoolContacts_BeforeShow = true;
//End tblSchoolContacts_BeforeShow

//Custom Code @642-C9B45C9B
// -------------------------
global $tblSchoolContacts;

if ($tblSchoolContacts->ds->RecordsCount == 0) {
$tblSchoolContacts->Button_Submit->Visible = False;
$tblSchoolContacts->Button_Cancel->Visible = False;
}

// -------------------------
//End Custom Code

//Close tblSchoolContacts_BeforeShow @622-7FC0CA9B
return $tblSchoolContacts_BeforeShow;
}
//End Close tblSchoolContacts_BeforeShow
-------------------------------------------------------

I'm beating my head against the wall wondering why this doesn't work. I
still see the buttons, along with my "No records" message. What am I not
doing? I've verified the names of the buttons are correct.

Thnx.


Don Safar
Posted: 04/05/2004, 3:06 PM

Try putting your code in the appropriate button control before show event.

"DataDoIt" <mike@datadoit.com> wrote in message
news:c4sl5i$bpq$1@news.codecharge.com...
> CCS2; PHP4; MySQL
>
> I'm attempting to hide the Submit and Cancel buttons on an Editable Grid
> when there are no records to display. The sample below isn't working for
> me:
>
> ------------------------------------------------------
> //tblSchoolContacts_BeforeShow @622-29C67EE8
> function tblSchoolContacts_BeforeShow()
> {
> $tblSchoolContacts_BeforeShow = true;
> //End tblSchoolContacts_BeforeShow
>
> //Custom Code @642-C9B45C9B
> // -------------------------
> global $tblSchoolContacts;
>
> if ($tblSchoolContacts->ds->RecordsCount == 0) {
> $tblSchoolContacts->Button_Submit->Visible = False;
> $tblSchoolContacts->Button_Cancel->Visible = False;
> }
>
> // -------------------------
> //End Custom Code
>
> //Close tblSchoolContacts_BeforeShow @622-7FC0CA9B
> return $tblSchoolContacts_BeforeShow;
> }
> //End Close tblSchoolContacts_BeforeShow
> -------------------------------------------------------
>
> I'm beating my head against the wall wondering why this doesn't work. I
> still see the buttons, along with my "No records" message. What am I not
> doing? I've verified the names of the buttons are correct.
>
> Thnx.
>
>
>

DataDoIt
Posted: 04/05/2004, 5:16 PM

Sorry Don. Tried your suggestion and unfortunately it still shows in my
editable grid form. Thanks.


"Don Safar" <donsafar_remove_@hotmail.com> wrote in message
news:c4sla1$cdj$1@news.codecharge.com...
> Try putting your code in the appropriate button control before show event.
>
> "DataDoIt" <mike@datadoit.com> wrote in message
>news:c4sl5i$bpq$1@news.codecharge.com...
> > CCS2; PHP4; MySQL
> >
> > I'm attempting to hide the Submit and Cancel buttons on an Editable Grid
> > when there are no records to display. The sample below isn't working
for
> > me:
> >
> > ------------------------------------------------------
> > //tblSchoolContacts_BeforeShow @622-29C67EE8
> > function tblSchoolContacts_BeforeShow()
> > {
> > $tblSchoolContacts_BeforeShow = true;
> > //End tblSchoolContacts_BeforeShow
> >
> > //Custom Code @642-C9B45C9B
> > // -------------------------
> > global $tblSchoolContacts;
> >
> > if ($tblSchoolContacts->ds->RecordsCount == 0) {
> > $tblSchoolContacts->Button_Submit->Visible = False;
> > $tblSchoolContacts->Button_Cancel->Visible = False;
> > }
> >
> > // -------------------------
> > //End Custom Code
> >
> > //Close tblSchoolContacts_BeforeShow @622-7FC0CA9B
> > return $tblSchoolContacts_BeforeShow;
> > }
> > //End Close tblSchoolContacts_BeforeShow
> > -------------------------------------------------------
> >
> > I'm beating my head against the wall wondering why this doesn't work. I
> > still see the buttons, along with my "No records" message. What am I
not
> > doing? I've verified the names of the buttons are correct.
> >
> > Thnx.
> >
> >
> >
>
>

DataDoIt
Posted: 04/08/2004, 8:33 AM

Per YesSoftware, this turned out to be a bug in CCS v2.2.3.40. Upgrading to
2.2.3.60 fixes the problem.

-Mike R.


"DataDoIt" <mike@datadoit.com> wrote in message
news:c4sl5i$bpq$1@news.codecharge.com...
> CCS2; PHP4; MySQL
>
> I'm attempting to hide the Submit and Cancel buttons on an Editable Grid
> when there are no records to display. The sample below isn't working for
> me:
>
> ------------------------------------------------------
> //tblSchoolContacts_BeforeShow @622-29C67EE8
> function tblSchoolContacts_BeforeShow()
> {
> $tblSchoolContacts_BeforeShow = true;
> //End tblSchoolContacts_BeforeShow
>
> //Custom Code @642-C9B45C9B
> // -------------------------
> global $tblSchoolContacts;
>
> if ($tblSchoolContacts->ds->RecordsCount == 0) {
> $tblSchoolContacts->Button_Submit->Visible = False;
> $tblSchoolContacts->Button_Cancel->Visible = False;
> }
>
> // -------------------------
> //End Custom Code
>
> //Close tblSchoolContacts_BeforeShow @622-7FC0CA9B
> return $tblSchoolContacts_BeforeShow;
> }
> //End Close tblSchoolContacts_BeforeShow
> -------------------------------------------------------
>
> I'm beating my head against the wall wondering why this doesn't work. I
> still see the buttons, along with my "No records" message. What am I not
> doing? I've verified the names of the buttons are correct.
>
> Thnx.
>
>
>


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.

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.