function iggrdGridKitMgmt_ColumnHeaderClickHandler(gridName, columnId, button)
{
// debugger;
var myCol = igtbl_getColumnById(columnId);
var myGrid = igtbl_getGridById(gridName);
if(myCol.Key != "ChkAll" && myCol.Key != "Uncheck All")
{
return;
}
if (myCol.Key == "ChkAll")
{
for (i = 0; i < myGrid.Rows.length; i++)
{
myGrid.Rows.getRow(i).getCellFromKey("ChkAll").setValue(1);
}
myCol.Key = "Uncheck All";
myCol.HeaderText= "Uncheck All";
}
else
{
for (i = 0; i < myGrid.Rows.length; i++)
{
myGrid.Rows.getRow(i).getCellFromKey("Uncheck All").setValue(0);
}
myCol.Key = "ChkAll";
myCol.HeaderText = "Check All";
}
}
//If template Column and inside we have check box
function iggrdGridKitMgmt_ColumnHeaderClickHandler(gridName, columnId, button)
{
//debugger;
var myCol = igtbl_getColumnById(columnId);
var myGrid = igtbl_getGridById(gridName);
if(myCol.Key != "ChkAll" && myCol.Key != "UncheckAll")
{
return false ;
}
if (myCol.Key == "ChkAll")
{
for (i = 0; i < myGrid.Rows.length; i++)
{
myGrid.Rows.getRow(i).getCellFromKey("ChkAll").getElement('chkSelect').all[0].checked=true;
}
myCol.Key = "UncheckAll";
myCol.HeaderText= "Uncheck All";
}
else
{
for (i = 0; i < myGrid.Rows.length; i++)
{
myGrid.Rows.getRow(i).getCellFromKey("UncheckAll").getElement('chkSelect').all[0].checked=false;
myGrid.Rows.getRow(i).getCellFromKey("UncheckAll").Column.Selected = false ;
}
myCol.Key = "ChkAll";
myCol.HeaderText = "Check All";
}
return false ;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment