Questions tagged as 'datagridview'

2
answers

dataGridView1_CellDoubleClick does not work!

I have the simplest function in the world and I can not make it work. When giving 2 clicks on any cell in my datagridview I want it to display the message "1" but it is not working! What's wrong? See my code: private void dataGridView1_...
asked by 16.06.2016 / 01:27
6
answers

Clear a datagridview in C #

I have tried all this already and nothing has served. All are excluding rows and columns. What I need is to clean up the content written on them. datagridview.datasource=null; datagridview.resetbindings(); datagridview.Rows.Clear() DataGridVie...
asked by 14.08.2014 / 20:54
2
answers

Changing rows in DataGridView / Opening a form with different design

I have a problem with a school project, as I said in the title, I need to change rows and open a form that already has design , but with different things, come on: The program is very simple, a datagrid , with Name, Id, Phone and a...
asked by 04.09.2016 / 00:38
1
answer

Selecting Row in a DataGrid from a search. W#

Good afternoon, Does anyone have a code where I can select a Row in a DataGrid , from a search? Where I make my Button_Click to a TextBox with a certain value, doing the search in DataGridView , thus selecting...
asked by 18.08.2016 / 21:30
2
answers

Repeat for many lines

I'm having a problem with an application I'm developing where I have a database with approximately 20 million lines. The problem is that the user wants to see all 20 million rows in a single screen, even if the scroll bar is huge, this table w...
asked by 30.03.2015 / 20:07
1
answer

How to return value to a DateTimePicker? W#

I want to return data from a DataGridView to a DataTimePicker so I can change this data and save it again, but I'm having a hard time doing this because DataTimePicker does not accept value type. private void btnAlterar_Cl...
asked by 10.11.2016 / 18:23
1
answer

DataGridView windows Forms

I have the following question: I have Grid that is composed of various information (id, city, zip code) and the user will select several lines in this Grid . I need to capture the selected codes, assign these IDs to a variable of ty...
asked by 24.02.2015 / 05:03
2
answers

Add a checkbox column in the datagridview

How to add a CheckBox type column in DataGridView? I need to do this for the user to select the row of the DataGridView with the CheckBox and then click the Save button. private void btnRestricao_Click_2(object sender, EventArgs e)...
asked by 13.02.2018 / 16:46
1
answer

How to read an excel file and do the mapping

I would like to know how I can read an excel file and then do the mapping to a datagridview. Code I tried: var fileName = @"C:\Users\HP8200\Desktop\test.xlsx"; var connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileNa...
asked by 25.09.2017 / 11:22
1
answer

Error: Value can not be null. Parameter name: dataTable. VB.NET

I'm trying to make a query in the database and display it in a datagrid , I do not have as much experience, I do technical course and it's my first question here, the code I'm using is this: Public Sub PreencheDataGrid(ByRef x As DataGri...
asked by 24.05.2017 / 15:33