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 -> General/Other

 Directory Object Root Parent

Print topic Send  topic

Author Message
davep

Posts: 41
Posted: 02/04/2009, 8:23 PM

I built a directory object, and I've done quite a bit of customization. I originally filled the records manually and set the parentID of the highest level entries to 0. This all worked fine, but now I'm having trouble setting these root parentID's to zero through a record object. I know that I could insert a default root record in the table with an ID of 0, and then have users select this as the parent when they're adding records at the highest level. But I'd prefer to just reset the directory to use a blank at the highest level parent. I believe that this is how it is setup in the example project.

I also know that I could delete my current directory object and add a new one, leaving the root category identifier empty this time, but then I'll have to redo all of my customization. So, is there any way to access this property on my current directory object and change the 0 to a blank?

I hope I explained this well enough...

Thanks,
Dave
View profile  Send private message
datadoit
Posted: 02/05/2009, 6:51 AM

Maybe perhaps in the record's OnValidate event:

if (!$Container->EditMode) {
if ($Container->ds->YourField == 0) {
$Container->ds->YourField = "");
}
}

But, also may want to check the database structure itself to make
certain that the ID field doesn't have a default value set to 0, or
cannot be set to NULL.
davep

Posts: 41
Posted: 02/05/2009, 7:23 AM

Quote datadoit:
Maybe perhaps in the record's OnValidate event:

if (!$Container->EditMode) {
if ($Container->ds->YourField == 0) {
$Container->ds->YourField = "");
}
}

But, also may want to check the database structure itself to make
certain that the ID field doesn't have a default value set to 0, or
cannot be set to NULL.

I think this is backwards from what I'm looking for. My problem is that I have the directory setup to use Zero as the root identifier, but I've not been able to populate the record with a Zero when inserting a new record. The field in question is actually being set through a list box that displays a text code but is bound to a numeric field. I don't require the field to allow the user to simply not select anything when adding a record with a root parent.

In retrospect, I should have left step 2 of the Directory Builder with a blank Root Category Identifier. This is why I'm trying to find out if there's anyway to change that property of the directory without rebuilding it.

Thanks,
Dave
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.