Questions tagged as 'datagrid'

1
answer

Pass data dynamically from one DataGridView to another DataGridView

I want to pass the data from a datagridview1 to another datagridview2 by pressing a button, but I want all the selected data to be passed. Until now I only get the records to go through one by one, that is a row. My problem is I can not get all...
asked by 19.09.2018 / 05:10
2
answers

Fill DataGrid with DataTable

The current situation is that I have this dataGrid1.ItemsSource = dt.DefaultView; datagridajuste(); The problem is that when I fill in my "datagrid" (no datagridview), this generates empty tables at the beginning and at the end....
asked by 22.04.2018 / 15:07
1
answer

Deactivate event cellendedit datagridview

I have a DataGridView that gets me values from a SQL Server table, I select a product and when I give click to the next cell, I get its price, this is generated with the event CellEndEdit , but I require change the pri...
asked by 19.04.2018 / 20:27
1
answer

How can I compare 2 data from a datagridview

Hello friends, I'm trying to compare a grid record, 2 values. DataGridViewRow row = dgvList.Rows[idx]; if (row.Cells[3].Value.Equals(row.Cells[5].Value.ToString())) { var alta = Application.OpenForms.OfType<Alt...
asked by 15.07.2018 / 21:31
1
answer

Color in Row DataGridView when Check box CheckBoxColumn, C #

I am giving color to the row of DataGridView if the cell box is selected, I have created a function which I invoke in the event CellValueChanged of DataGridView works fine, but only when it is the user that check the box, i...
asked by 28.02.2018 / 20:25
1
answer

Event problem double click on datagrid

Hi, I have a problem that if I double-click on a datagrid header it returns an error in the CellDoubleClick event, I am interested in the event being valid for all the cells except the headers, I tried with e.RowIndex> 0 or e.RowIndex < >...
asked by 31.12.2017 / 07:12
1
answer

Doubt: Column DataGridView that only accepts hour format (12h / 24h) in C #?

I have a DataGridView that contains several columns and there are two Columns which should only allow the user to type the time , I have made it from the following way: Event EditingControlShowing to invoke the KeyPress method:...
asked by 21.12.2017 / 15:23
2
answers

Problem: Set SelectedValue in DataGridViewComboBoxColumn, C #

A DataGridViewComboBoxColumn does not have the properties SelectedIndex , and SelectedValue . However, I want to get the same behavior of SelectedValue    I have a DataGridView that contains several columns of whic...
asked by 09.01.2018 / 21:23
1
answer

How to disable Ctrl + Arrow down on datagridview vb.net?

The problem is that in editing mode when doing copy-paste control is used and the arrow to move to the cell below but if you keep pressed control and the arrow goes to the last record of the datagridview and this will make the users are wrong, i...
asked by 25.01.2018 / 23:19
1
answer

I need help with a project in C #

Good, I'm doing a project in windows form and what it does is upload an excel file pass the data to a dataGridView and save them in a MySQL database, the problem is that this excel shows data of a cycle of 4 months and this is the last month the...
asked by 10.05.2017 / 02:35