jquery - Yii2: What is the different between a HTML table and a GridView? -
i know gridview php it's executed in server side , html table executed in client side, jquery , bootstrap.
i learning yii2 , have been using gridviews. has features buttons edit, view , delete, , can sort.
now learning jquery can make html table bootstrap , results same.
i needing simple table, without features gridview has. need features: a checkbox each row, user can check rows , send php server.
so confused. option better?
yii2 gridview yii2 php widget (alias part of code ) generate automatically html table code starting configuration value pass in gridview widget call
it extremely useful if need build frequent feature representation in form of table included filtering , sorting. takes data data provider , renders each row using set of columns presenting data in form of table.
you can see result of widget looking @ code generated in html page in browser can see html source usint ctrl +u (if take deep @ resulting html code can recognize how tipical element table organized yii2. naming convention id, row , on )
html table tag container of element show data in tablutar form
so gridview widget piece of code generate hatml lable stricly integrated yii2 feature filtering , ordering ..
for static data rapresentation gridview widget enough .. interactive data once datas displayed must take @ pjax , or @ jquery manage client side result of php widget generated code ..
http://www.yiiframework.com/doc-2.0/guide-output-data-widgets.html http://www.yiiframework.com/doc-2.0/yii-grid-gridview.html http://www.yiiframework.com/wiki/772/pjax-on-activeform-and-gridview-yii2/
if result of widget complex interaction can build html table looping on result of query, of dataprovider or collection of models
Comments
Post a Comment