ExtJS hbox - combo trigger - extjs

i have the hbox layout as below
window
--------------------------
| panel
| Form
| hbox
| row 1 combo1 combo2
| form
| hbox
| row 2 combo1 combo2
|
|
--------------------------
The row 2 is added dynamically on clicking a button. Same code is executed to add row 1 and row 2 to hbox. When i click on combo1 in row#1 the roe#2 combo gets clicked.
Any idea why this happens and any suggestion on how i can achieve the behaviour of clicking combo of particular row displays its store?

try using itemId property of form field.
refer docs and extjs-avoid-using-the-id-property

Related

DatagridView after user edit a cell value

I have a DatagridView that are populated manually (no Bind).
Have 3 columns:
Value 1
Value 2
And Value 3
The user can edit value 1 and value 2 columns.
After the user edit the value 1 or value 2 i need to do something:
if((Value 1 + Value 2) > Value 3)
The row color change to red
else
the row color change to green
Question:
What event should i use to capture the user input?
I tried CellValueChanged, CellValidatin and CellEndEdit, but some events are triggered when the grid its populated, and other are triggered if the user do a simple click on the grid...
I need to do something only when the user end edit a cell (value 1 or value 2) manually
Thanks a lot

How to dynamically change columns position in a grid in extjs?

I have a grid with 3 columns ( name | lastname | age ) in that order. What I need is to change the position of the columns when clicking a button to ( age | lastname | name). Is there any way of doing this ? I did it by creating 2 grids and change them each other when the button is clicked but I was wondering if there is any way of doing the same thing with only one grid.
Here is a link how to dynamically set column order using a button. The example should help you in your quest to fill your needs.

add a new row consisting of 2 combobox ,1 textfield and a button to panel in EXTJS

On cliking on the button the whole row should get duplicated.
Here is what I have done using normal JavaScript :
function addRow()
{
var dataval= document.getElementById("dup").innerHTML;
var x=document.getElementById('table').insertRow(0);
x.innerHTML=dataval;
}
Volvo
Saab
Fiat
Audi
Volvo
Saab
Fiat
Audi
I want to build this kind of example on the panel in EXTJS.
plzz help !!!
I am just a beginner of EXTJS.
Rohan,
php Developer
You can do this by defining array of comboBox, array of textField and array of button. and you can arrange these in a row using colum model. You just neeed to call function to add new row in which you can put comboBoxes, textField and a button.

How to set default name to GtkComboBox?

I want to set my GtkComboBox to have some default value/name, on it as follows:
+---------------+---+
| Image Options | X |
+---------------+---+
| Image Option 1 |
+-------------------+
| Image Option 2 |
+-------------------+
| Image Option 3 |
+-------------------+
"Image Options" will be just a Title and it will disappear once user selects any option from list. when user click on the list and selects "Image Option 3" then it will display selected value insted of "Image Options". "Image Options" will not be a part of option list.
I don't think you can. The GtkComboBox shows data from a model. You're asking it to show a piece of data that is not in the model.
If you want to change which row of data (in the model) is changed, you can use the gtk_combo_box_set_active() call. Note that it takes an integer index (model row number) though, not a string so you cannot use it to make the box show data that is not in the model.
Consider labelling the widget using a nearby GtkLabel instead, or perhaps using a pop-up tooltip.

Sortable combo box with columns

I have a combo with more than one value in it (different bindings from the same source)
I would like to create a combo box where the user could sort by those columns and also include a header to clarify the informations
Example :
Item No | Name | Rank
00 | foo | 0
01 | bar | 2
02 | too | 1
We could sort by Item No, Name or rank.
Is it even possible?
Thanks!
Doing it with a ComboBox is definitely possible, but involves changing the entire ComboBox template such that the Popup hosts a ListView. As a simpler alternative, you might consider just using a ToggleButton and Popup, with a ListView inside the Popup.

Resources