Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I make a gridView in yii-booster bootstrap widget with popups for buttons in one of its column
    primarykey
    data
    text
    <p>I am a fresher in Yii, I need to make a gridView for employee details in Yii, for that I have followed the procedures mentioned in <a href="http://yii-booster.clevertech.biz/components.html#tables" rel="nofollow">http://yii-booster.clevertech.biz/components.html#tables</a>. And I have created a gridView with some sample data, exactly like clevertech.biz has done, and i succeeded in that. But my actual requirement is to make a gridView with popup windows for viewing and editing employee details and a javascript confirmation before deleting entries. Here is my code, that created a grid and a popup window but the actions for each button is not separated, the popup works for the entire cell under a particular column, not for a button in that cell. Can anyone help me to resolve this issue?</p> <pre><code>$stu-&gt;id = 3; $stu-&gt;name = 'Stu'; $stu-&gt;address = 'Dent'; $stu-&gt;position = 'SE'; $stu-&gt;joinDate = '2012-12-14'; $stu-&gt;age = 30; $stu-&gt;phone = 1112226789; $persons = array($mark, $jacob, $stu); $gridDataProvider = new CArrayDataProvider($persons); // $gridColumns $gridColumns = array( array('name'=&gt;'id', 'header'=&gt;'#', 'htmlOptions'=&gt;array('style'=&gt;'width: 60px')), array('name'=&gt;'name', 'header'=&gt;'Name'), array('name'=&gt;'address', 'header'=&gt;'Address'), array('name'=&gt;'position', 'header'=&gt;'Position'), array('name'=&gt;'joinDate', 'header'=&gt;'Join Date'), array('name'=&gt;'age', 'header'=&gt;'Age'), array('name'=&gt;'phone', 'header'=&gt;'Phone'), array('header'=&gt;'Options', 'htmlOptions' =&gt; array('data-toggle'=&gt;'modal', 'data-target'=&gt;'#myModal'), 'class'=&gt;'bootstrap.widgets.TbButtonColumn', 'viewButtonUrl'=&gt;null, 'updateButtonUrl'=&gt;null, 'deleteButtonUrl'=&gt;null,), ); $this-&gt;widget('bootstrap.widgets.TbExtendedGridView', array( 'type'=&gt;'bordered', 'dataProvider'=&gt;$gridDataProvider, 'template'=&gt;"{items}", 'columns'=&gt;$gridColumns, )); ?&gt; &lt;!-- View Popup --&gt; &lt;?php $this-&gt;beginWidget('bootstrap.widgets.TbModal', array('id'=&gt;'myModal')); ?&gt; &lt;!-- Popup Header --&gt; &lt;div class="modal-header"&gt; &lt;h4&gt;View Employee Details&lt;/h4&gt; &lt;/div&gt; &lt;!-- Popup Content --&gt; &lt;div class="modal-body"&gt; &lt;p&gt;Employee Details&lt;/p&gt; &lt;/div&gt; &lt;!-- Popup Footer --&gt; &lt;div class="modal-footer"&gt; &lt;!-- save button --&gt; &lt;?php $this-&gt;widget('bootstrap.widgets.TbButton', array( 'type'=&gt;'primary', 'label'=&gt;'Save', 'url'=&gt;'#', 'htmlOptions'=&gt;array('data-dismiss'=&gt;'modal'), )); ?&gt; &lt;!-- save button end--&gt; &lt;!-- close button --&gt; &lt;?php $this-&gt;widget('bootstrap.widgets.TbButton', array( 'label'=&gt;'Close', 'url'=&gt;'#', 'htmlOptions'=&gt;array('data-dismiss'=&gt;'modal'), )); ?&gt; &lt;!-- close button ends--&gt; &lt;/div&gt; &lt;?php $this-&gt;endWidget(); ?&gt; &lt;!-- View Popup ends --&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload