views:

67

answers:

1

Hi,

i am jsgrid i want have implemented the add row button. when i click on thet button its open the form in dialog box with submit and cancel button.

i just want to add the row in in jqgrid. i dont want to save it to database how can i achieve this.

Thanks

A: 

have solved the problem using..

it add the new empty row to the GRid...

onClickButton: function() {
          var last = jQuery('#test').jqGrid('getGridParam','records'); 
                      //alert(last);   
              AddNewRow (last);
          }

v

var AddNewRow = function(id){

                      var datarow = {Consultant:"",Role:"",Task:"",SDate:"",EDate:"",
                                       Deliverables:"",Complete:""};

                      var lastsel2 = parseInt(id) + 1;
                      //debugger;
                      var su=jQuery("#test").addRowData(lastsel2, datarow, "last") ;
//                  if (su) { 
//                          jQuery('#test').editRow(lastsel2,true); 
//                                            
//                     
//                           }  


                      };
Shivi