N
N
nepster-web2014-05-17 13:50:02
Yii
nepster-web, 2014-05-17 13:50:02

How to open modal windows for each entry in GridView yii2?

How to open modal windows for each entry in GridView yii2?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
urfinjazz, 2015-07-14
@nepster-web

you need to create an empty modal window, wrap the GridView in Pjax
and load your posts into the modal window with something like this request:

$('.activity-view-link').click(function() {
      $.get(
          'путь до страницы с шаблоном',
          {
              id: $(this).closest('tr').data('key')
          },
          function (data) {
              $('.modal-body').html(data);
              $('#activity-modal').modal();
          }
      );
  });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question