Questions tagged as 'datagridview'

1
answer

Event DataGridView.CellClick

How can I use the DataGridView.CellClick event to click on a single column? The way I did it in my code if I click any part of the datagrid it does the action, and did not want it to be that way I want to click one and a specific colum...
asked by 22.09.2017 / 14:25
1
answer

How to manually add rows in a datagriedview populated with MySql data

I have a DataGridView in which I populate it with data from a mysql table and then need to add rows with data from some textbox, when I try to return the following error: "Can not add rows programmatically to the DataGridView row collection when...
asked by 18.06.2017 / 23:39
1
answer

How to add a row at the start of the dataGridView C #

I'm developing a Tetris game in Windows Forms, I have programmed the movements of all the pieces, I now have to delete the lines that are painted completely. To remove a line use the code: dgvTetris.Rows.RemoveAt(27); As soon as I remove...
asked by 01.11.2016 / 17:48
1
answer

Using the bindingNavigator

I fill in a dataGridView via SQL and fill in a dataTable . I would like to associate a bindingNavigator with this dataGridView . I can not. Follow the code. string arquivo = System.AppDomain.CurrentDomain.BaseDi...
asked by 17.10.2016 / 01:17
1
answer

Traverse all rows in a DataGridView

I have this for: For Each DataGridViewRow In F_Principal.DataGridView2.Rows How do I select row by row? Is there any way to see how many times it has been repeated?     
asked by 02.02.2016 / 10:38
1
answer

How to create events dynamically? W#

I am doing a project of a statistical calculator, in it I made a method that creates tabs in a tab control and within them a datagridview to display the different tables generated by the program. I need an event that auto-populates datagrid c...
asked by 16.04.2016 / 17:11
1
answer

Updating a datagrid with connection to mysql

I can not update a table from a database linked to a datagrid. When I change the data in the cells of the datagrid, although they appear changed during the debug, at the end the table is not updated. Does anyone know what's missing in the code?...
asked by 16.12.2015 / 11:22
1
answer

C # put a condition for a column value in a DataGridView with DataSource

I'm using VS2013 Entity 5. The situation is as follows: In a Children table, there is a SexString attribute that receives the value 0, 1. 0 for male and 1 for female. (could use "m" or "f", but it is a learning situation) In my DataGridVie...
asked by 18.09.2015 / 22:03
1
answer

Apply filter in DataGrid filled with List without changing DataSource

Is it possible to apply filter to a DataGridView that is "filled" with a List , without changing the DataSource of the grid? Example: When I have a grid that uses a BindingSource I can apply a filter, such as meu...
asked by 18.08.2015 / 16:15
1
answer

Capture datagrid id

If I want to capture the value of the ID column of the selected row, do I necessarily need to use the wind SelectionChanged , which is to be fired at every row change in the datagrid? Or just dataGridView1.CurrentRow.Cells[0].Value ,...
asked by 12.09.2015 / 01:39