AfterCellUpdateHandler para habilitar un control ImageButon si alguna fila tipo CheckBox de un WebGrid esta Habilitado

function uwgDatosContacto_AfterCellUpdateHandler(gridName, cellId){
//Add code to handle your event here.
var oGrid = igtbl_getGridById("<%=WebGrigEjemplo.ClientID%>");
var ControlEliminar= document.getElementById("<%=imbEliminar.ClientID%>");

var cell = igtbl_getCellById(cellId);

if (oGrid == null)
var Counter = 0;
if (cell != null && cell.Column.Key == "chkEliminar")

//recorremos la grila fila por fila
for(var i = 0; i < oGrid.Rows.length; i++)
// se obtiene fila por fila
var oRow = oGrid.Rows.getRow(i);
//se obtiene el valor de la celda de tipo CheckBox del WebGrid
var cellCheckValue = oRow.getCellFromKey("chkEliminar").getValue();
// entra al if si el valor de la columna chkEliminar es verdadera
if (cellCheckValue=="true")
 //cuento las filas chequedas para la eliminaciòn


//si la variable counter es mayor a Cero muestro el control ImageButton (control aspx)
if (Counter>0)
ControlEliminar.disabled = false; = "alpha(opacity=100)";
ControlEliminar.disabled = true; = "alpha(opacity=50)";

About omaracostacasas

This entry was posted in Infragistics. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s