Here is my code for combobox which is in FormPanel: - var dept_names = [
-
['1','Electronics and Communication'],
-
['2','Electrical and Electronics'],
-
['3','Telecommunication Engineering'],
-
['4','Instrumentation and Electronics Engineering']
-
];
-
Code for combobox in FormPanel:
-
{
-
xtype:'combo',
-
-
fieldLabel:'Department Name',
-
-
allowBlank:false,
-
-
autoShow:true,
-
-
id:'department',
-
-
name:'department',
-
-
emptyText:'Select the Department from the List',
-
-
selectOnFocus:true,
-
-
forceSelection:true,
-
-
resizable:true,
-
-
store: new Ext.data.SimpleStore({
-
id:0,
-
-
autoLoad:true,
-
-
fields:
-
[
-
'deptId',
-
'deptName'
-
]
-
-
,data:dept_names
-
-
})
-
-
,valueField:'deptId'
-
,displayField:'deptName'
-
,hiddenName:'deptId'
-
,mode:'local'
-
-
}
-
When i run it i'm getting the combobox and getting emptyText also...
But the data given in the dept_names is not getting populated :(
Please do help me.
Thanks in advance.
3 9219
Hi,
Here with I have attached a sample code. I created this one with Ext 2.1 - <html>
-
<head>
-
<link rel="stylesheet" type="text/css" href="ext-2.1/resources/css/ext-all.css" />
-
<script type="text/javascript" src="ext-2.1/adapter/ext/ext-base.js"></script>
-
<script type="text/javascript" src="ext-2.1/ext-all.js"></script>
-
<link rel="stylesheet" type="text/css" href="ext-2.1/examples/shared/examples.css" />
-
-
</head>
-
<body>
-
<div>
-
Department Names: <input type="text" id="yourCombo">
-
</div>
-
<script type="text/javascript">
-
-
Ext.namespace('Ext.deptdata');
-
-
Ext.deptdata.dept = [['Electrionics and Communication', 'Electronics and Communication'],
-
['Electrical and Electronics', 'Electrical and Electronics'],
-
['Information technology', 'Information technology'],
-
['TeleCommunication', 'TeleCommunication']];
-
-
var combo1 = new Ext.form.ComboBox({
-
store: Ext.deptdata.dept,
-
displayField:'deptName',
-
typeAhead: true,
-
mode: 'local',
-
triggerAction: 'all',
-
emptyText:'Select the Department from the List',
-
selectOnFocus:true,
-
applyTo: 'yourCombo'
-
});
-
</script>
-
</body>
-
-
</html>
Thanks and Regards
Ramanan Kalirajan
Hello RamananKalirajan... I tried with the example you gave me, but still i'm not getting the drop down list. I checked for store getting data, its getting. I dont know why i'm not getting the drop down list. Can you tell me where i am going wrong.
Please check for the path and everything. Post the code what you have tried and please let us know whether are you getting any exception
Thanks and Regards
Ramanan Kalirajan
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jassim Rahma |
last post by:
Hi,
what is the best way to populate comboBox from database.. the reason I
am asking is that i have more than 8 comboBoxes in one form and each
should retrieve data from a table and I don't want...
|
by: Hyper X |
last post by:
Hey guys,
I have about 150 forms using the ComboBoxes. There is at least one
combobox in every form. I am filling the comboboxes on FormLoad of
every form.
Eg.,
Fill Staff table on form...
|
by: Mike L |
last post by:
I tried a sample of code in MSDN magazine, but now I'm stuck. What code has
the best performance to populate a Data Grid with a SP? Below is the code I
have, which might be completing the wrong...
|
by: Sean Holt via DotNetMonster.com |
last post by:
In my application I have about 15 comboboxes and checkboxes scattered
throughout 5 tabs. After I populate the combobox and try to null it out
(by just highlighting and deleteing), the data...
|
by: DSR |
last post by:
Help Please... I would like to populate a combo box on a form with a
query that compares data from two tables. Any record that is unique in
table1 should continue to populate my combobox. The...
|
by: agrawal.solutions |
last post by:
Hello Friends
I am asking a very silly question but i dont find any solution fo
this..
I am selectiong a recordset and want to populate a combobox where id
would be inviseble and the content...
|
by: vnaz235 |
last post by:
Hi, guys,
1. Can anybody help me to populate ComboBox on VB6 form with
a) text strings from the range on the already existing Excel sheet (e.g.,...
|
by: freekedoutfish |
last post by:
Hi. New member here
Im sat at work, pounding my head off the desk because this tiny bit of simple code refuses to work.
The sub is intended to pull data from the "companyname" column in the...
|
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= |
last post by:
Hi,
I've a column in a dataGridView set as combobox. I can't find any example
showing how to populate the list in the combobox. Does anyone have an example
showing me this.
Regards Jesper.
|
by: =?Utf-8?B?Q2hyaXM=?= |
last post by:
This actually stemmed from anther post I created.
But, I have two combo boxes. ComboBox1 is populated by a list of Systems
(DataSet from Oracle Query).
Now, I want to take Combobox2, and when...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |