Questions tagged as 'datagridview'

1
answer

Coloring Datagridview with C # Comparison

I would like to know if you have any way to color the row in the datagridview without using a loop. I have a minimum stock and when available is below the minimum I would paint the red line. Ididitthatway,butitgotreallyslow.for(inti=0;i&l...
asked by 20.06.2018 / 20:34
1
answer

Does not insert rows in DatagridView

I make a select in my database and it brings the values in the datagrid. But when I try to add / delete lines, it gives error:    You can not programmatically add rows to the DataGridView rows collection when the control is bound to data. "...
asked by 01.08.2017 / 23:11
2
answers

What better way to align columns of DataGridView C #

What is the best way to align the columns of a DataGridView, because if you placed to align by the size of the column name you cut cells that are larger than the size of the column name, and when placed to align by the cell and the cell size is s...
asked by 06.06.2017 / 19:19
1
answer

Save data from a textbox in a class and display in a datagrid

I am making a program for simple registration, without using a database, only with an array. The program was already functional when I noticed that the most important part was wrong because I had not understood correctly. I just did not use the...
asked by 02.03.2017 / 12:58
3
answers

Using CellClick to load data from a record

I'm doing a C # application in Windows Forms from Visual Studio without using a database, I'm handling everything by one class (Person) and two other classes (PersonFisica and PersonJuridica) inherited from the base class. I'm trying to load...
asked by 06.03.2017 / 13:51
1
answer

Object reference not set to an instance of a Visual Studio object

I am having problem in the id variable of my dataGridView, it is giving the following error: "Object reference not set to an instance of a Visual Studio object". I am using Windows Form, MySQL and the DataGridView. Here is the code: //Declaran...
asked by 04.11.2016 / 11:53
1
answer

Error sorting GridView with empty row column [closed]

You're making a mistake here that I'm not sure how to circumvent, since my program reads a website, sometimes the site can get out of the norm and end up leaving something empty, so when my GridView tries to sort, since it is bugging ... Here...
asked by 06.09.2016 / 11:44
1
answer

Object List (with some objects as attributes) for DataGridView - C # [duplicate]

How do I show the Street or Zip Code from the list below in the DataGridView. People List ( to show in datagridview ) List<Pessoa> Pessoas; Person Class using System; public class Pessoa { public int id { get; set; } p...
asked by 13.10.2016 / 20:43
1
answer

Value of the first cell of the selected row datagridview

Friends, good night. I'm having trouble handling the data in a datagridview, I need to assign the value of the cell to the first column of the row the user selected when the user clicks the row. Then I created an Event of type SelectionChange...
asked by 27.06.2016 / 06:09
1
answer

How to compare two dates in DatagridView and change color when VB.Net expires

My codes Private Sub CadastroDataGridView_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles CadastroDataGridView.CellFormatting If Me.CadastroDataGridView.Columns(e.ColumnIndex).Name = "DataGridViewTextBoxColum...
asked by 28.01.2016 / 13:05