dpeterson
Posts: 13
|
Posted: 06/03/2008, 11:39 AM |
|
I saw this post on the boards. I am experiencing the exact problem. Has anyone been able to solve this?
----------------------------------------------
guys,
This seems pretty simple but i cant get it to work. I am using an editable grid.
I have one hidden field in my editable grid. Based on this fields value i want to make fileUpload control either visible or hidden.
I have tried custom events in:
*editableGrid (beforeShow)
*editableGrid (Row beforeShow)
*hiddden field (breforeShow)
*file upload (beforeShow)
any help would be great!
-------------------------------------------
after thinking about it and reading a little further i realized that because i am using an editable grid and all of the form elements have an itterator appended on them i would need something to loop through the form elements themselves.. like this i believe:
http://forums.codecharge.com/posts.php?post_id=44431
i am using codecharge 3.0 and i already have the GetItemByName in the clsControls class. But when i try access the [form_name].Controls object i get an error:
Microsoft VBScript runtime (0x800A01A8)
Object required: [form_name].Controls
i instantiate the class as follows:
dim FormControls
Set FormControls = [form_name].Controls
Not quite sure why i cannt get the the class. for form_name i am using the editable grid name, which is the same name the html form gets after compiling.
any ideas guys?
thanks!
Brian
|
|
|
Chris__T
Posts: 339
|
Posted: 06/06/2008, 2:07 PM |
|
Sounds like something similar I was dealing with concerning editable grids. I was wanting to change elements, but since editable grid is "dynamic" you couldn't address just the form control, but the form_control_x.
Check this link out: http://forums.codecharge.com/posts.php?post_id=60507
It might give you some ideas.
My solution was using
this.value
|
|
|
dpeterson
Posts: 13
|
Posted: 06/09/2008, 5:16 AM |
|
Thanks for the reply. That helps. Also, CC Support replied with this bit of code:
To use the GetItemsByName, you need to write something like this:
FormName.ValidatingControls.GetItemByName("controlName_rowNumber").Visible = True
However, this will only work for controls that are submitted (i.e. textboxes, checkboxes, etc..)
For labels, you just have to suck it up and have one line of code for every label.
|
|
|
|