Hi ,
I have to list 2 grid views inside same tab , please let me know if any solution.
Hi ,
I have to list 2 grid views inside same tab , please let me know if any solution.
there is a Guide about using Multiple GridViews on one page:
https://www.yiiframework.com/doc/guide/2.0/en/output-data-widgets#multiple-gridviews
does this solve the situation?
Yes ,
echo Tabs::widget([
'items' => [
[
'label' => 'test,
'content' => '<div class="table-responsive">' . GridView::widget([
'dataProvider' => $dataProviderRaw,
'columns' => $gridColumns,
]) . '</div>',
'headerOptions' => ['id' => 'agent_recorded_hourlog'],
'options' => ['id' => 'tab1'],
'active' => $active
],
[
'label' => 'test2',
'content' => $approve_button . $logbutton . '<div class="table-responsive">' . GridView::widget([
'dataProvider' => $dataProvider,
'columns' => $gridColumns1,
]) . GridView::widget([
'dataProvider' => $dataProvider_idle,
'columns' => $gridColumns3,
]). '</div>',
'headerOptions' => ['id' => 'recorded_hourlog'],
'options' => ['id' => 'tab2'],
'active' => $active1
],
]]);
Here i used Gridcolumn2 and gridcolumn3 inside a same tab , it worked as expected. Thankyou @CeBe