Hi
1) I am using a WebCombo release 2009.2, patch 2099
The same problems occurs with release 2010.3, patch 1013
2) We have a webcombo in a webform, in the AfterSelectChange JavaScript event
If the Editable property of the webcombo is true, the JavaScript webCombo.getDataValue() is incorrect (returns the display value instead)
If the Editable property of the webcombo is false, then the JavaScript webCombo.getDataValue() is correct.
function webCombo1_AfterSelectChange(webComboId)
{
//Add code to handle your event here.
var webCombo=igcmbo_getComboById("<% =webCombo1.ClientID %>");
//here is a bug: webCombo.getDataValue() returns CustomerName instead of CustomerCode ?!
alert( "DataValue: " + webCombo.getDataValue() + '\r\nDisplayValue: ' + webCombo.getDisplayValue() );
}
3) The same problem in JavaScript also occurs in the AfterCloseUp() JavaScript event, if the C# webCombo1_SelectedRowChanged(object sender, Infragistics.WebUI.WebCombo.SelectedRowChangedEventArgs e)
is set.
Thank you please see the attached sample project and screen capture as well.
Here are some comments on this case:
1) From the Infragistics support, I have received the following response:
The behavior you are seeing is expected. This was introduced as a feature in 8.2. The reason why the text is returned instead of the value is because the typed text does not need to match an entry in the drop down therefore there is may be no corresponding values in the combo
2) I've also read below
http://forums.infragistics.com/forums/t/15894.aspx
that
>When the Editable property = true, then the DataTextField and DataValueField must be
>pointing to the same field as the combo wouldn't be able to guess value for the entered
>text.
In my opinion, I consider that restricting DataTextField to be same as DataValueField is not necessary when:
- Set the EnableXmlHTTP property to True.- Set the Editable property to True. - Set the ComboTypeAhead property to Suggest
because in this case, the webCombo is able to find the DataValue for the entered text, by using the out-of-band XMLHTTP requests, databinding and data fetching done using InitializeDataSource event
Please see below:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.1/CLR3.5/html/WebCombo_Enable_Smart_CallBacks_in_WebCombo.html