Anuja
Anuja

Reputation: 97

How to add only one row in inline Jqgrid

I am working on one webapplication in that I am using Inline Jqgrid . but when web form is in create mode then in That jqgrid only one row will be added not more than one row .for that I will be try like this:

if(CardCode=="")
            {
                $("#Stages").jqGrid("inlineNav","#nav-Stages",{        
                    edit: false,
                    add: false,
                    addicon:"ui-icon-plus",
                    save:true,     
                    view:true,     
                    cancel: false,
                    addParams:{position:'last'}
                }); 
                  $("#Stages").jqGrid('addRow',{position:'last'}); 
            } 

In that jqgrid add,edit properties are set to false and single row is added at last position.but in this situation the issue is that I am not able validate that jqgrid because save button is inactive at that time then what is solution for that . I am using jqgrid version 5.0.0 Please suggest some solution.

Upvotes: 0

Views: 250

Answers (1)

Oleg
Oleg

Reputation: 222017

Try to use free jqGrid (the latest released version is 4.13.5) instead of commercial Guriddo jqGrid JS, which you use currently. You can just load jqGrid files directly from CDN (see the wiki article and the come example).

Free jqGrid is the fork of jqGrid, which I develop. It uses internal events in many places. Thus Save button of inlineNav (or formatter: "actions" or in any other way) will be automatically active on starting inline editing. Thus you should have activated Save button after calling of addRow method, which starts inline editing.

Upvotes: 1

Related Questions