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.
>
>
>
|
|
|