
how-to block ads
|
  johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| Extjs grid combo box.
Wow this thing is making me SoOooOooo mad. I originally tried it on someone heres advice, anything to add? Just wondering if maybe you have run into this same deal 
»extjs.com/forum/showthread.php?p=195024 -- Connecticut Web Design and Development | |   PToN
join:2001-10-04 Houston, TX
| Are you trying to populate the combo box from a DB..?
Try to mimic the example »extjs.com/deploy/dev/examples/gr···-grid.js
What's not working..? Do you get the combo box..? Do you get it, but it shows no data..? | |   johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| Ive done everything I can think of lol.
What Im trying to do is have it pull from the xml, which is working, i get the correct one selected, but when you change it, have the value go into the store and the text go into the box.
I can post the sample xml Im using too if that helps :)
I know its possible, I just cant get it to work for the life of me :(
Heres what I settled on, i gave up for a while (line 155)lol:
-- Connecticut Web Design and Development | |   johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| reply to PToN
-- Connecticut Web Design and Development | |   PToN
join:2001-10-04 Houston, TX
| Let me see if i get this right: So you want to have a combo-box with: val1, val2, val3 and you have an empty text-box.
When you select val2 from the combo box, you want to store val2 into the datastore and display it in the text-box...
Did i get it right...? | |   johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| I have the grid with a select box in the column. Its like this:
value=2 text=pounds value=3 text=feet
So they would be selecting the text pounds, but it should post the value 2.
(priority was unit, but Ive beens crewing around with it lol) -- Connecticut Web Design and Development | |   PToN
join:2001-10-04 Houston, TX | i believe i have the answer for you... =D
let me look at my code, be back in a few | |   PToN
join:2001-10-04 Houston, TX
| reply to johnnyboyct Ok the way i did it was to get the ID within the datastore and then use the hidden value property to post a different value than the one displayed..
Here is that i did:
My data record has: partn and partnID, which for you it would be value=partnID and text=partn.
Then look at my combo box: i used the Display property to show the "text" and the valueField and the hiddenName properties to post the "value" or in my specific case the partnID.
You must use the valueField and hiddenName together. For some reason i could not get it to work.... This should work for you. NOTE: that my combo-box is in a formPanel and not a Editable Grid, but i dont think it should make a difference..
Let me know.. | |   PToN
join:2001-10-04 Houston, TX | reply to johnnyboyct So did it work....? You are killing me man... I need to know...! | |   johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| Haha, I got so frustrated I really cant look at that god damn thing lol.
I SOOOOOO appreciate the post, it looks like its going to work. Sounds like basically the same thing. For a work around I made it post the actual text and did a lookup on that 
Ill let you know when my eyes stop bleeding lol.
John -- Connecticut Web Design and Development | |
-
|