evento ClickCellButton en CodeBehaind para verificar si se ejecuta clic en un boton en un control UltraWebGrid

protected void uwgDatosContacto_ClickCellButton(object sender, CellEventArgs e)
{

try
{

// key asignado al campo de tipo botón para la columna del ultraWebGrid

if (e.Cell.Key == "Editar")
{

// Asigno valores de la grilla a controles de usuario para editarlos

Session["identificadorContacto"] = int.Parse(e.Cell.Row.Cells.FromKey("ContactoId").Value.ToString());
Session[
"modoContacto"] = this.chrModo = ‘E’;
txtApellidos.Text = e.Cell.Row.Cells.FromKey(
"Apellidos").Value.ToString().Trim();
txtNombres.Text = e.Cell.Row.Cells.FromKey(
"Nombres").Value.ToString().Trim();
txtDirResidencia.Text = e.Cell.Row.Cells.FromKey(
"DirResidencia").Value.ToString().Trim();
txtEmailPersonal.Text = e.Cell.Row.Cells.FromKey(
"EmailPersonal").Value.ToString().Trim();
txtCodigoPostal.Text = e.Cell.Row.Cells.FromKey(
"CodigoPostal").Value.ToString().Trim();
txtTelefono.Text = e.Cell.Row.Cells.FromKey(
"Telefono").Value.ToString().Trim();
txtCelular.Text = e.Cell.Row.Cells.FromKey(
"Celular").Value.ToString().Trim();
txtFax.Text = e.Cell.Row.Cells.FromKey(
"Fax").Value.ToString().Trim();
txtEmpresa.Text = e.Cell.Row.Cells.FromKey(
"Empresa").Value.ToString().Trim();
txtCargo.Text = e.Cell.Row.Cells.FromKey(
"Cargo").Value.ToString().Trim();
txtDirempresa.Text = e.Cell.Row.Cells.FromKey(
"DirEmpresa").Value.ToString().Trim();
txtEmailEmpresa.Text = e.Cell.Row.Cells.FromKey(
"EmailEmpresa").Value.ToString().Trim();
chkVip.Checked =
bool.Parse(e.Cell.Row.Cells.FromKey("Vip").Value.ToString().Trim());}
}
catch (Exception ex)
{
    throw new Exception(ex.Message, ex);
}

}

}

About omaracostacasas

ING SOFTWARE
This entry was posted in Infragistics. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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