Feb 27, 2014, 7:01 AM
[CLOSED] ComboBox does properly set their value and text
Hi I am using Custom search for combobox
It properly work for custom search and drop down list but issue is that when I edit an Record and load data in custom combobox then I am getting problem, the problem is that either DisplayField set or it ValueField, I need both DisplayField and ValueField, the function setValuetoCombobox is used to set ValueField and DisplayField in V1.1, to set valuefield and displayfield I pass three parameter of my custom function , Is previous extjs not supportable in current version of Extjs??
Here is the link to setValue() for combobox in current version
http://docs.sencha.com/extjs/4.2.2/s...ethod-setValue
To make it clear here I have ComboxBox, DisplayField and ValueField but how to set using my custom function "setValuetoCombobox" in current version of Extjs
Thanks
It properly work for custom search and drop down list but issue is that when I edit an Record and load data in custom combobox then I am getting problem, the problem is that either DisplayField set or it ValueField, I need both DisplayField and ValueField, the function setValuetoCombobox is used to set ValueField and DisplayField in V1.1, to set valuefield and displayfield I pass three parameter of my custom function , Is previous extjs not supportable in current version of Extjs??
Here is the link to setValue() for combobox in current version
http://docs.sencha.com/extjs/4.2.2/s...ethod-setValue
To make it clear here I have ComboxBox, DisplayField and ValueField but how to set using my custom function "setValuetoCombobox" in current version of Extjs
Thanks
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Ext.NET v2 Example</title>
<script type="text/javascript">
Ext.applyIf(Request, {
setValuetoCombobox: function (combobox, valueId, valueText) {
Ext.form.ComboBox.superclass.setValue.call(combobox, valueText);
combobox.value = valueId;
}
});
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" ShowWarningOnAjaxFailure="false" />
<ext:Window runat="server" ID="window_Request_Detail" Width="790px" Layout="Form"
AutoScroll="true" Title="AddNewRequestDetail" Height="669px" Modal="true" Closable="true"
CloseAction="Hide" Resizable="false" BodyStyle="background-color:#dfe8f6" Maximizable="true">
<Items>
<ext:TabPanel ID="tbpanelHelpDeskInfo" runat="server">
<Items>
<ext:FormPanel ID="frmpnl_RequestInfo" Padding="10" Height="580px" runat="server"
AutoScroll="true" MonitorValid="true" Title="TitleRequestInfo">
<Content>
<ext:Container ID="Container2" Layout="Column" Height="205px" runat="server">
<Items>
<ext:Container ID="Container3" ColumnWidth="0.5" StyleSpec="padding-right:5px" runat="server">
<Items>
<ext:ComboBox Width="350px" DataIndex="CategoryId" FieldLabel=" Category" ID="cmb_Request_Categories"
runat="server" DisplayField="Name" ValueField="Id" AllowBlank="false" Editable="true"
EmptyText="Select Category" Selectable="true" TypeAhead="false" LoadingText="Searching..."
HideTrigger="false" MinChars="1">
</ext:ComboBox>
</Items>
</ext:Container>
</Items>
</ext:Container>
</Content>
</ext:FormPanel>
</Items>
</ext:TabPanel>
</Items>
</ext:Window>
</form>
</body>
</html>
Last edited by Daniil; Mar 11, 2014 at 6:39 AM.
Reason: [CLOSED]