New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GridView JS problem with custom template #2516
Comments
Please give more details as what does not work for you... also provide the complete grid code. I just set on one a grid and the "check all" works as expected... also selecting all rows checks the checkboxes of those rows and the "check all" box. |
You can try eg. this one: $rawData = array(
array('name' => 'Name1', 'value' => 'Value1'),
array('name' => 'Name2', 'value' => 'Value2'),
array('name' => 'Name3', 'value' => 'Value3'),
);
$dataProvider = new CArrayDataProvider($rawData, array(
'keyField' => false,
));
$template = '<div class="items-wrapper">{items}</div>';
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'test-grid',
'dataProvider' => $dataProvider,
'selectableRows' => 2,
'template' => $template,
'columns' => array(
array(
'class' => 'CCheckBoxColumn',
),
'name',
'value',
),
)); As you can see, checking the box does not select any rows (only checks the boxes without adding the |
right, issue confirmed... I was clicking directly on the row and then it was working, the check-all click is not working... Request a PR and we will merge the changes... |
OK, thanks! |
The fix for #769 and #1225 seems to be somewhat incomplete.
There are (at least) 4 more places to replace children with find:
I think there is no more place, but essentially everywhere settings.tableClass is the selector the code should search also in deeper levels.
Without these changes the check-all box and the other functions do not work correctly with a custom template like this:
<div class="items-wrapper">{items}</div>
The text was updated successfully, but these errors were encountered: