开发者

Add empty row to the jgrid

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


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); 
//                                            
//                     
//                           }  


                      };
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜