paramquery / grid

jQuery grid plugin based on jQueryui widget design
paramquery.com
GNU General Public License v3.0
543 stars 255 forks source link

Use pq grid in bootstrap modal div shows no column title. #85

Open tomchen618 opened 9 years ago

tomchen618 commented 9 years ago

I try to use pq grid in my modal div. but there is no column title showing.

paramquery commented 9 years ago

Can you please share a jsfiddle. http://jsfiddle.net/paramquery/bphnecvm/ Thanks

tomchen618 commented 9 years ago

I use ajax to call a page contains 2 pqgrid.

Both pqgrid have no columns heads.

  1. this is the calling ajax

$.ajax({ mimeType: 'text/html; charset=utf-8', // ! Need set mimeType only when run from local file url: "home/pqdataFilter", type: 'GET', data: { asfilterid: filterid, asviewmodelname: filterviewmodel }, success: function (data) { $('#ajax-modal').html(data); $('#ajax-modal').modal().css({ width: 'auto', 'margin-left': function () { return -($(this).width() / 2); } });

           },
           error: function (jqXHR, textStatus, errorThrown) {
               alert(errorThrown);
           },
           dataType: "html",
           async: false
       });
  1. the following is the page contains 2 pqgrids

Setting show styles

        </div>
    </div>
    <div class="modal-footer">
        <button type="button" data-dismiss="modal" class="btn btn-app"

id="closefilter">Close

    </div>
</div>
  1. and the following is the jquery to initialize the 2 pqgrids

On Tue, Aug 11, 2015 at 7:19 PM, Paramvir Dhindsa notifications@github.com wrote:

Can you please share a jsfiddle. http://jsfiddle.net/paramquery/bphnecvm/ Thanks

— Reply to this email directly or view it on GitHub https://github.com/paramquery/grid/issues/85#issuecomment-130137168.

paramquery commented 8 years ago

Initialize or refresh the grid in shown.bs.modal event.

tomchen618 commented 8 years ago

Refresh

On Tue, Oct 20, 2015 at 2:45 AM, Paramvir Dhindsa notifications@github.com wrote:

Initialize or refresh the grid in shown.bs.modal event.

— Reply to this email directly or view it on GitHub https://github.com/paramquery/grid/issues/85#issuecomment-149498061.