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

 List box on editable grid

Print topic Send  topic

Author Message
greywire


Posts: 37
Posted: 03/14/2008, 11:45 AM

I want a list box with a query that's dependant on a value from that row in an editable grid form.

It would seem to be supported, in that the datasource for the list box can be a query with a 'where' clause that uses a parameter of type 'application' which should be a value from the editable grid row.

But this does not work.

The end result would be an editable grid where for each row, the list box could have different contents. For a new row, you would need to use some AJAX stuff to populate the listbox once something else in the row was selected (in my case I wouldnt be needing to add new rows).

Right now, I just do the query myself in the beforeshowrow function, and create the array and stuff it into the listbox->Values.
_________________
--
Aric Caley
Fonality, inc
View profile  Send private message
imroza

Posts: 21
Posted: 03/16/2008, 2:22 AM

i have the same problem. I have tried in several ways but I have still not resolved the problem.
if you have new ideas makes to know me.
Thanks
View profile  Send private message
greywire


Posts: 37
Posted: 03/17/2008, 11:02 AM

This is how I am currently solving the problem:

In the BeforeShowRow callback for my editable grid, I have this:

$db = new clsDBtrixbox; //** use your particular connection class here
$db->query("SELECT *
FROM endpoint_config_key_enum
WHERE enum_key = " . $config_key->ds->f('key_id')); //** the query, using a field from the editable grid (config_key) datasource (ds). This of course will be different for each row.
$enum = array();
while ($db->next_record()) {
$enum[] = array($db->f('enum_val'), $db->f('enum_name')); //** take the values and make them into an array that codecharge wants
}

$config_key->enum->Values = $enum; //* finally, stuff that array into the listbox control

This all assumes that all the listboxes are using values from the same table, you're just limiting which ones show in which listboxes. If you wanted to use values from different tables, you would need to determine which table to use, and you would need to do that on the form submit as well (where in the example above, this isn't needed).

Hope that helps.

_________________
--
Aric Caley
Fonality, inc
View profile  Send private message
imroza

Posts: 21
Posted: 03/19/2008, 8:21 AM

thanks in order to have to me helped :-) :-)

if I know new ideas i tell you

best regards
Robert
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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