0

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?

AJJ
  • 3,570
  • 7
  • 43
  • 76
  • 1
    post some code & make sure you haven't specified same id to combo – MMT Aug 23 '12 at 11:49
  • i have same id for the combos. I need the same set of components to be added on click of a button. So same id will be there are combo for all rows of hbox. Will this be a problem? If yes, is there any way to override this? – AJJ Aug 23 '12 at 12:45
  • 1
    try using `itemId` property of form field. http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.ComboBox-cfg-itemId. refer : http://softdevbuilttolast.wordpress.com/2012/06/20/extjs-avoid-using-the-id-property-unless-you-have-to/ – MMT Aug 23 '12 at 13:14
  • http://www.sencha.com/forum/archive/index.php/t-232279.html?s=41d2d8d57e1dc785fb8a3cb113f6dd9d – MMT Aug 23 '12 at 13:22
  • Thanks MMT.. itemId for components under form works.. :-) can you post your itemId comment as answer. So that it will be userful for others too.. – AJJ Aug 23 '12 at 14:11

1 Answers1

1

try using itemId property of form field.

refer docs and extjs-avoid-using-the-id-property

MMT
  • 2,206
  • 2
  • 16
  • 25