jQWidgets Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts

  • piponzio
    Participant

    Hi Peter, the problem was due to this configuration in jqxgrid:

    sortable: true,
    showfilterrow: true,
    filterable: true,
    columnsresize: true,
    editable: true,
    selectionmode: ‘singlerow’,
    editmode: ‘selectedrow’, // it causes the problem
    pageable: true,
    pagermode: ‘simple’,
    virtualmode: true

    which must be:

    sortable: true,
    showfilterrow: true,
    filterable: true,
    columnsresize: true,
    editable: true,
    selectionmode: ‘singlerow’,
    editmode: ‘dblclick’, // it works
    pageable: true,
    pagermode: ‘simple’,
    virtualmode: true

    I don’t know why, but now it works.


    piponzio
    Participant

    Hello Peter, I think the problem is not related to my specific scenario: it seems that adding a row when a server side multi page grid is filtered by a column, results in adding/visualizing 2 new rows instead of 1.


    piponzio
    Participant

    The problem happens also if I use ‘type: POST’ for my gridview jqx.dataAdapter.

    My code is:

    var mygridsource =
    {
    .....
       datatype: "json",
       type: "POST",
       addrow: function (rowid, rowdata, position, commit) 
       {				
                             rowdata['insert'] = true;
                             $.ajax(
                             {
                               dataType: 'json',
    			   type: 'POST',
                               url: 'myurl.php', //insert and retrieve last inserted id
                               data: rowdata, 
                               success: function (data, status, xhr) {
                                  commit(true, data); 
                               },
                               error: function () {
                                  commit(false);
                               }
                            });
    					
       }
    };
    
    $("#addRow").click(function() {
                    $("#jqxgrid").jqxGrid("addrow", null, {}, "first"); //insert a row at first position with row id retrieved from insert operation
                });

    piponzio
    Participant

    Thanks Peter, but is there any parameter configuration for gridview which use POST method also for sorting, filtering etc…?

    I suspect that the default configuration for these operations uses GET method, that’s why I notice a strange behaviour when executing POST ajax calls with datagrid in filtering mode (for example 2 rows are added when addrow function is executed and gridview has filtered columns; it doesn’t happen if there are no filtered columns).

Viewing 4 posts - 1 through 4 (of 4 total)