views:

1327

answers:

2

Hi all. I'm currently using the Infragistics component set for .Net 2.0, Visual Studio 2005 and C#. I have the following chunk of javascript code (text and other variables are declared elsewhere):

***alert(box[select].value);

text.value(box[select].value);

alert(text.value);***

'text' is an Infragistics webTextEdit, while box is just a standard listbox. The two alerts seem to be working fine. Before I set the value, the listBox's selected value might be 'hello', and the alert box which pops up after I've assigned this value to 'text' is also 'hello'.

However, the value shown in the box on my form never appears to get updated. Anybody have some suggestions as to where I'm going wrong, gotchas in how Infragistics handles this kind of thing or anything else? I'm aware there may not be enough info here to diagnose the problem.

+1  A: 

The value property is only available server-side. Using it client-side won't do anything. Setting it would have to be done server-side, or you'll need to craft fun javascript to address the text of the element that the control is actually rendered as in the browser.

http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Infragistics2.WebUI.WebDataInput.v7.3~Infragistics.WebUI.WebDataInput.WebTextEdit~Value.html

Nikki9696
+1  A: 

Unless I misunderstand the question, if text is an instance of the Infragistics WebTextEdit, you should just be able to do:

text.setValue(box[select].value)

Or if text is the underlying input control, but 'id' is the ID of it,

var edit = igedit_getById(id)
edit.setValue(box[select].value)

See the WebTextEdit CSOM for more.

DocMax