PDA

View Full Version : Hidden field in grid?



TheBigOnion
27 May 2010, 11:27 AM
Hello all,
I have a grid with about four columns on it. But my data set has about 7. I only want the four columns showing though. Anyhow, when I click on a row, I need to capture one of the fields I do NOT show in my grid. Is there a way to take one of the fields that is not one of my columns and make it a row ID or a hidden field somehow?

Thanks,
Michael

CrazyEnigma
27 May 2010, 11:53 AM
A grid is bound to a store, so you can get the store's data, and find out what the ID is from there, no?

TheBigOnion
27 May 2010, 4:27 PM
A grid is bound to a store, so you can get the store's data, and find out what the ID is from there, no?

That sounds good. Do you have an example of how to do that?

CrazyEnigma
27 May 2010, 7:37 PM
The Grid is the view mechanism for the Store.

Assuming you are using the rowclick event listener:


grid.getStore().getAt(rowIndex).id;

Would be the id from the row, also assuming that you specified the idProperty of the Store.