In my parent view I have this grid:
$this->widget('bootstrap.widgets.TbGridView', array(
'id' => 'mainGrid',
'dataProvider' => $model->search(),
'filter' => $model,
//'ajaxUpdate' => 'updateData',
'selectionChanged' => "updateChild", // new code
'columns' => array(
'firstName', 'lastName'
)
));
In my child view, I have another grid that appears if the child data has appropriate categories to display about it. This is done in an AJAX manner with a renderPartial() in the controller method:
$this->widget('bootstrap.widgets.TbGridView',
array(
'id' => "familyGrid",
'type' => 'striped bordered',
'dataProvider' => $relatedData['families'],
'columns' => array(
array(
'name' => 'Family Name',
'value' => '$data->familyName'
),
array(
'name' => 'First Line Address',
'value' => '$data->Address1'
),
array(
'name' => 'City',
'value' => '$data->City'
),
array(
'name' => 'State',
'value' => '$data->State'
),
array(
'name' => 'ZIP',
'value' => '$data->ZIP'
)
)
));
When a person is clicked on the GridView in the parent view, their data appears in the child view, and if they belong to any families, the second GridView will render this. If this is the case, when I try and click on another person on the GridView in the parent view, I get the following error:
Cannot read property ‘tableClass’ of undefined.
It’s as if jQuery has forgotten that the table is there, or something.
There does not seem to be any documentation regarding this error, and I have no idea how to remedy it. Are there any solutions to this?