Questions tagged as 'datagridview'

2
answers

How to hide column of DataGridView?

I have the void PopulaGrid(DataGridView grid, SQLiteDataReader dados) function that feeds my dataGridViewAlunos data, I would like to know how to hide the first column of dataGridViewAlunos which is the column correspondin...
asked by 13.12.2015 / 02:23
1
answer

Create header (rows) of array in DataGridView

Would somehow have C # use this pointed column of the image to add value to it as if it were a "header"? I'm using DataGridView below to show an array. The array header is already being shown in the columns because I can use: gridVie...
asked by 05.04.2017 / 15:16
1
answer

Reload DataGridView in C #

I'm creating an event from a button in which it creates a Product object and adds it to a list of Products and using this list to populate the DataSource of a dataGridView, but the DataGridView always keeps appearing a single product. private v...
asked by 09.01.2017 / 18:43
2
answers

Compare the values of an entire column of the DataGridView with a variable

I would like to compare the value of a string variable with an entire column of the DataGridView. There is a code that looks at the whole column, more or less textbox.Text = datagridview.columns("nome_da_coluna").value Or do I have to...
asked by 02.02.2014 / 02:39
1
answer

Add row to DataGrid with DataSource defined

I have DataGridView that has DataSource setado with List<MinhaClasse> and would like to add a new line to it. I know this is not possible using the AddRow() method of DataGrid . Is there any way I...
asked by 16.10.2015 / 21:53
1
answer

Popular datagrid with threading

I'm contracting a Windows Form application. I am not getting my datagrid popular with a threading , the following error appears:    "Invalid thread operation: datagrid control accessed from a thread in the thread it was created on.  ...
asked by 14.08.2015 / 03:35
1
answer

Insert database record into columns of DataGridView in C #

I have a problem: I have DataGridView1 and when I read the database records each line should be added to a Column of my DataGridView1 . Example my DataGridView1 has the Column1, Column2, ... Column10 columns and...
asked by 28.07.2015 / 19:39
1
answer

How do I associate datatable fields with DataGridView columns?

My problem is following, I make a query in the database that returns me a datatable with a wide variety of fields. The goal is to display this query in the datagridview, however, displaying only some of the datatable fields. I had a previous...
asked by 14.04.2014 / 17:03
1
answer

How to display 2 DB tables within a DataGridView in the application?

I have an application developed C# using the Windows Forms project that displays the Database People Table in a list in the DataGridView field. However I need to display in the DataGridView also the Endereco ta...
asked by 16.08.2017 / 13:08
3
answers

Show property value instead of class name in DataGridView [closed]

I have a DataGridView that should show data between related tables and I can not show the data correctly, it shows the name of the nameSpace followed by the name of the class. I saw some things and they showed an override, but I also read that i...
asked by 07.10.2016 / 14:51