protected void llenarGrid(string nombre, string cedula) { this.grw_clientes.DataBindings.Clear(); grw_clientes.Columns.Clear(); string mensaje = ""; ClienteTR tran = new ClienteTR(); int registros = (this.cmb_registros.Text != "TODOS") ? Convert.ToInt32(this.cmb_registros.Text) : -1; DataTable datos = tran.consultarClientes(ref mensaje, nombre, cedula, registros); if (datos != null) { this.grw_clientes.DataSource = datos; this.grw_clientes.Columns[0].Visible = false; int ancho = this.grw_clientes.Width - 20; this.grw_clientes.Columns[1].Width = Convert.ToInt16(ancho * 0.15); this.grw_clientes.Columns[2].Width = Convert.ToInt16(ancho * 0.30); this.grw_clientes.Columns[3].Width = Convert.ToInt16(ancho * 0.15); this.grw_clientes.Columns[4].Width = Convert.ToInt16(ancho * 0.37); DataGridViewButtonColumn bcol = new DataGridViewButtonColumn(); bcol.Width = 20; bcol.HeaderText = ""; bcol.Name = "botonEditar"; bcol.UseColumnTextForButtonValue = true; //grw_empleado.Columns.Insert(5, bcol); this.grw_clientes.Columns.Add(bcol); } else { Mensaje.error(mensaje); } }