D
darren.murray2
Hello all,
I'm fairly new at this so I may be doing this the wrong way but I've
got a FormView within a multiview that when it is updated in edit
mode, will call on the update method associated with the
objectdatasource that fills the formview.
Problem:
One of the fields is a textbox that when clicked has to open up a
popup window with a listbox and when that popup closes, it sends the
results as a comma delimited string back to the text box. I've done
this with javascript and had to switch from an asp:textbox to input
textbox as I don't believe the asp textbox control has an onclick
event. The issue is that to use the input textbox I have to use
value='<%# Eval("Mrkts") %>' instead of value='<%# Bind("Mrkts") %>'
because if I try Bind it says "A call to Bind must be assigned to a
property of a control inside a template. As is, using Eval, when it
invokes the update method it does not carry over the newly updated
value within the textbox.
Is there a way to work this into a bind that I'm missing?
I tried to go about it by creating another textbox somewhere within
that formview that i would use to pass to the update method but within
the javascript I need to do getElementById(controlID) but I am unable
to track down how it is building this controlID. I can do this for a
asp textbox outside of the formview but that is no help.
I'm thinking the best approach is to have it go into the code behind
when hitting the update button and call the update method from in
there but I'm not able to see any of the values for any of the fields
within this formview from the codebehind the way I'm doing it. I've
tried FindControl with not much luck.
If anyone can provide some insight I'd be thrilled. Thanks1
I'm fairly new at this so I may be doing this the wrong way but I've
got a FormView within a multiview that when it is updated in edit
mode, will call on the update method associated with the
objectdatasource that fills the formview.
Problem:
One of the fields is a textbox that when clicked has to open up a
popup window with a listbox and when that popup closes, it sends the
results as a comma delimited string back to the text box. I've done
this with javascript and had to switch from an asp:textbox to input
textbox as I don't believe the asp textbox control has an onclick
event. The issue is that to use the input textbox I have to use
value='<%# Eval("Mrkts") %>' instead of value='<%# Bind("Mrkts") %>'
because if I try Bind it says "A call to Bind must be assigned to a
property of a control inside a template. As is, using Eval, when it
invokes the update method it does not carry over the newly updated
value within the textbox.
Is there a way to work this into a bind that I'm missing?
I tried to go about it by creating another textbox somewhere within
that formview that i would use to pass to the update method but within
the javascript I need to do getElementById(controlID) but I am unable
to track down how it is building this controlID. I can do this for a
asp textbox outside of the formview but that is no help.
I'm thinking the best approach is to have it go into the code behind
when hitting the update button and call the update method from in
there but I'm not able to see any of the values for any of the fields
within this formview from the codebehind the way I'm doing it. I've
tried FindControl with not much luck.
If anyone can provide some insight I'd be thrilled. Thanks1