View Full Version : Problem in Editable Grid (Text Column)

30 May 2007, 11:23 AM
I dont know where to star this, it seems that I always come with the wrong question, but here we go:

I have an editable grid with 4 columns, first: Image, second: TextField (where is the problem), third: Boolean, fourth: Boolean.

Then problem is that I dont know what event I should threat to save the text typed getting the id of the Image, the event of submiting fires just when is clicked OUT of the selected line, and the problem is when the user clicks *other* line, when is in the same I know how to capture the entire Record.

I tried the 'change' event but may occur that problem I mentioned.

Showing my code:

dsPhotos = new Ext.data.Store({
proxy: new Ext.data.HttpProxy ({url:'action_getPhotos.php'}),
reader: new Ext.data.JsonReader(
{root:'photos', id: 'id', totalProperty: 'totalCount'},
{name: 'id', type: 'int'},
{name: 'description'},
{name: 'filename'},
{name: 'src_folder'},
{name: 'url_folder'},
{name: 'thumbnail'},
{name: 'main', type: 'boolean'},
{name: 'locked', type: 'boolean'}

var textFieldPhotoDescription = new fm.TextField({
allowBlank: true,
maxLength: 60
textFieldPhotoDescription.on('change', function(field, newValue, oldValue){
if(newValue != oldValue){
selectedRow = grid.getSelectionModel().getSelected();
photoID = selectedRow.data.id;
alert(newValue+' - '+oldValue+', '+photoID);
header: "Description",
width: 250,
sortable: true,
dataIndex: 'description',
editor: new Ed(textFieldPhotoDescription)

Any ideas how I could get that id to send to server?

Thanks - I hope who is able to help can understand my problem

31 May 2007, 1:59 AM
Nothing? :((