PDA

View Full Version : [CLOSED] Update cell value in gridpanel



Sowjanya
Aug 22, 2013, 5:48 PM
Hi,

How can i update a cell value of a record ( that is dragged from another grid) in a grid panel ?

I am trying to use this in order to set the value:
App.Gridpanel1.store.getAt(rowindex).set('columnna me',newValue);

(Pls confirm if this is the way to update cell text ? I am not sure because it uses store to get the record's index...but store is not applicable in this case as the record is just been dragged and dropped. so, it is not updated in store also.)


But, I am not sure how to get the updated rowindex in drag drop grid, as the rows order keeps changing....

Any solution is highly appreciated.

Thanks,
Veda

Sowjanya
Aug 22, 2013, 6:52 PM
Hi,

How can i update a cell value of a record ( that is dragged from another grid) in a grid panel ?

I am trying to use this in order to set the value:
App.Gridpanel1.store.getAt(rowindex).set('columnna me',newValue);

(Pls confirm if this is the way to update cell text ? I am not sure because it uses store to get the record's index...but store is not applicable in this case as the record is just been dragged and dropped. so, it is not updated in store also.)


But, I am not sure how to get the updated rowindex in drag drop grid, as the rows order keeps changing....

Any solution is highly appreciated.

Thanks,
Veda


Just to add, I am not selecting the row ( i am not using selectionmodel at all. So, I will not be able to get the index through selectionmodel object.)
As shown in the attachment, I am just clicking the commandbutton thats on each row and hence need to get the correct index of that row when the command button is clicked.

And fyi, I am calling a direct method in command Handler for some other purpose. Is it something that i can also pass the correct index value of that record ( after all rows/records that are dragged/dropped and then reordered) as one of the arguments to that direct method ?

Daniil
Aug 23, 2013, 5:26 AM
Hi Veda,

Please open:
http://examples2.ext.net/#/Events/Listeners/Arguments/

Enter CommandColumn in the first field and Command in the second one. You will see a signature of the event:

function ( item, command, record, recordIndex, cellIndex )

It is a set of arguments being passed to the Command event which you are probably using. You can see "record" and "recordIndex" there.