Rank: Advanced Member Groups: Member
Joined: 10/20/2008 Posts: 75
|
Hello, how can I check / uncheck alle row of a checkbox columns in a grid with a button?
Thanks, Andrea
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You can do it either on the server side or on the client side. If you do it on the server side, you would just change your data source so that it contains true for that field. If you do it on the client side, you would need to use some JavaScript. It will be something like this:
Code: JavaScript
function checkColumn(gridId, columnIndex)
{
//Get the grid object
var grid = eo_GetObject(gridId);
for (var i = 0; i < grid.getItemCount(); i++)
{
//Get the grid item
var item = grid.getItem(i);
//Get the cell for the checkbox column
var cell = item.getCell(columnIndex);
//Check it
cell.setValue("1");
}
}
Hope this helps. Thanks
|
Rank: Advanced Member Groups: Member
Joined: 10/20/2008 Posts: 75
|
thanks
|