Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Edit row problem
15/03/2010
22:40
Avatar
battancs
Hungary
New Member
Members
Forum Posts: 1
Member Since:
15/03/2010
sp_UserOfflineSmall Offline

Hi!

The problem is the following:

I made custom line editor:

$("#bedata").click(function(){ jQuery("#User").jqGrid('editGridRow',"new",{
        url: "index.php?r=admin/user/create",
        reloadAfterSubmit:false}); });

If the application returns an error, the error can not write the text, but also 'error Status:' Create error '. Error code: 400 '.

If the original function to use, it is the correct error text will be printed.

Thank you

17/03/2010
21:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Sorry I do not understand what you mean.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

29/03/2010
13:37
Avatar
Izaskun
Member
Members
Forum Posts: 6
Member Since:
29/03/2010
sp_UserOfflineSmall Offline

Hello,

I´ve the same problem as battancs.

I've a grid like this:

("#grid_plantilla").jqGrid({
        url: "v93PlantillaMatHomologadosInOP.do?action=",
        datatype: "json",
        scroll: true,
        width: 895,
        height: 'auto',    
        mtype: 'POST',
        colNames: ['id','codCampo','descripcion','valor','tipDato','decimales','longitud','tabla','multiple','oblig'],        
        colModel: [{name:'id',index:'1',width:100,editable: true},//hidden:true, , editable:false
                   {name:'codCampo',index:'2',width:100,editable: true},//hidden:true,, editable:false
                   {name:'descripcion',index:'3',width:300,editable: true},
                    {name:'valor',index:'4',width:400,editable: true},
                   {name:'tipDato',index:'5',width:500,editable: true},
                     {name:'decimales',index:'4',width:500,editable: true},
                     {name:'longitud',index:'4',width:500,editable: true},
                     {name:'tabla',index:'4',width:500,editable: true},
                     {name:'multiple',index:'4',width:500,editable: true},
                     {name:'oblig',index:'4',width:500,editable: true, hidden:true}],
        viewrecords: true,
        imgpath: jsPath,
        multiselect: true,
        multiboxonly: true,        
        pager: $("#pager_grid_plantilla"),
        editurl:'clientArray',    
        gridComplete: function(){
            repintarPlantilla();
        },
        ondblClickRow: function(){
            editarFilaPlantilla();
        }
    });

And when I want to edit a row I do this:

$("#grid_plantilla").jqGrid('editGridRow',filaSeleccionada,{height:280, bSubmit: "hola",reloadAfterSubmit:false});

But whe I check the button submit I get this error:

error Status: 'Not Found'. Error code: 404

[Image Can Not Be Found]

[Image Can Not Be Found]

Could you hel me?

Thanks you very much

31/03/2010
20:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

editurl:'clientArray', 

is not supported in editGridRow method. Create a empty file in the server and just set it to the edit url.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/04/2010
13:47
Avatar
Izaskun
Member
Members
Forum Posts: 6
Member Since:
29/03/2010
sp_UserOfflineSmall Offline

Hello,

Thanks you Tom it was very usefull for me.

Could you help me with another problem?

I ned to feed a grid's column's cells with a combobox, a checkbox or a textbox, depending of a concrete value i'm reading from database.

In order to do this I've created a grid with 5 columns, the first column is always visible and others columns are always invisible (the second column type is select, third is checkbox, fourth is textbox and the fifth column has the codes selected in the combo just in case you use it) . The first column contains the value fed by the hidden columns.

I use the code "plantillaGrid.editGridRow( numFila, {height:280, bSubmit: "hola",reloadAfterSubmit:false} )" to edit a row and, depending the row I select, I hide or show one of the columns wich are hidden in the original grid.

For example I've a grid like this.

1st record has to be a checkbox

2nd record has to be a multiple select

3rd record has to be a textbox

When I edit the first record I hide the first column and show the third one. I check the checkbox and when I click Submit button, the selected row has to be changed according to the values I've entered in the window opened by the editGridRow sentence. After doing this, the first column must be updated to "Yes".

When I edit the second record I hide the first column and show the second one. I select all the values I want in the combobox and, when I click in submit button, after updating the row, I´ve to put  the selected values on the combobox in the first column, and the codes selected in the combo in the 5th column...

I've tried using the afterSubmit, afterShowForm, onclickSubmit and onClose events, but none of them seem to fit my concrete needs: they always seem to be triggered when jQgrid hasn't still changed the edited row's values with the values entered in the new window.

Thanks you very much,

Izaskun

08/04/2010
13:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Maybe you will need to use beforeShowForm, but if you use a paging buttonns in the form you will have trouble with this.

I recommend you to disble these buttons (see docs) and use the beforeShowForm in both add and edit in order to do what you want. Also it is a good idea to use closeAfterAdd and closeAfterEdit options in order to close the form when you post the values.

Also into the documentation page there is example haw to dynamically show/hide a row in the form.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

22/04/2010
09:32
Avatar
Izaskun
Member
Members
Forum Posts: 6
Member Since:
29/03/2010
sp_UserOfflineSmall Offline

Thanks you very much Tony.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
48 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information