Customization of datagridview in c#

Asked

Viewed 309 times

0

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

I’m doing a project and I’m having customization problems in my datagrid, as the information of the two textboxes return in the same datagrid I can’t customize the header of the two, but of only one, someone knows how to fix it, with the creation of a method or something similar?

  • Young man, can you explain your problem better? I can’t understand anything. You [Dit] your question whenever you need.

1 answer

0


André,

What you are wanting to do has no way, because they are different results, this type of grid is not made for this.

1) If you need to display two results at the same time, you will have to build two grids on the screen.

2) If you just need to display a result, another time, I suggest that the mounting of the columns of the grid is dynamic, this has how you do

     private System.Windows.Forms.DataGridViewTextBoxColumn coluna;
     this.dgvEventos.Columns.Add(this.coluna);
  • I made the switch to two grids

Browser other questions tagged

You are not signed in. Login or sign up in order to post.