0

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.

4

2 回答 2

1

除非我误解了这个问题,如果text是 Infragistics WebTextEdit 的一个实例,你应该能够做到:

text.setValue(box[select].value)

或者 iftext是底层输入控件,但 'id' 是它的 ID,

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

有关更多信息,请参阅WebTextEdit CSOM

于 2008-10-10T00:48:28.787 回答
1

value 属性仅在服务器端可用。在客户端使用它不会做任何事情。设置它必须在服务器端完成,或者您需要制作有趣的 javascript 来处理控件实际呈现在浏览器中的元素的文本。

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

于 2008-09-18T16:44:56.517 回答