Welcome Guest Search | Active Topics | Sign In | Register

Checkbox columns select all Options
AndreaZ
Posted: Wednesday, November 19, 2008 12:32:28 AM
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
eo_support
Posted: Wednesday, November 19, 2008 6:15:25 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
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
AndreaZ
Posted: Wednesday, November 19, 2008 9:01:23 AM
Rank: Advanced Member
Groups: Member

Joined: 10/20/2008
Posts: 75
thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.