Questions tagged as 'datagridview'

1
answer

Change color of a given cell

I have a DataGridView that has 8 columns (days of the week) and x rows (times of day). I need to paint only one cell, thus: HowcouldIdothis?Ialreadyhavethefollowingmethods:DateTimediaAgenda=DateTime.Now;DateTimediaInicioAgenda;Date...
asked by 25.11.2015 / 20:36
1
answer

How to save scrollbar position?

I would like to get the scrollbar position of DataGridView , so after giving a refresh , continue in the same position.     
asked by 26.02.2015 / 14:50
2
answers

C # Simple - Forms - Move to the datagrid which I select in the combobox [closed]

Well, I'm new to programming language, I need some help. I'm trying to call the database in combobox with select, but I'm not able to do a function that when I click OK, it shows me the answer of what I selected. I need that help. using System...
asked by 11.08.2014 / 19:47
1
answer

Put a combobox on a column of a datagridview

Using C #, with EntityFramework and codefirst, I have the following classes in my models layer: public class Cliente { public int ClienteId { get; set; } public string Nome { get; set; } public string Email { get; set; } public...
asked by 08.07.2017 / 04:11
1
answer

Send data from a GridView on a Form to ComboBox on another Form

I'm trying to send the data from a gridview in a second Form to a combobox in form master but I have not been successful. I would like to know if there is a way to do this without being sent as a parameter, since I wi...
asked by 07.06.2017 / 00:40
1
answer

Databinding for JSON.NET objects: how to implement?

My application handles a lot of HTTP requests that return JSON data. I use the JSON.NET library to manipulate them. Here is a simulated and fairly brief example of the information (there are redundancies in the original data, which I can not pos...
asked by 08.01.2017 / 12:13
1
answer

Automatic view of a selected row

I have a worksheet where I can load numerous records, and I also have a field to search for any record. When I search for a particular record and the system finds this ROW it is automatically selected! Currently, when I look up the reg...
asked by 15.12.2016 / 21:56
1
answer

Fit the columns header into a DGV, C #

Is there any way to embed the columns into a DGV so that it does not overlap (Follow the img as an example). Or Resize the DGV so that it shrinks to the required size of columns ? at runtime. I'm using direct connection to...
asked by 24.09.2016 / 18:33
1
answer

Remove Row DataGridView Windows Form C #

I'm trying to delete row by line in DataGridView , these lines would be in the case files (attachments) without any database connection, only the following error message appears:    It is not possible to programmatically remove rows unl...
asked by 07.06.2016 / 18:03
1
answer

C # DataGridView align header in center

I'm suffering to get the DataGridView header aligned. I want the text to be centered in the center. Here is the code: dg.EnableHeadersVisualStyles = false; // Desabilita formatação padrão dg.ColumnHeadersDefaultCellStyle.Fon...
asked by 05.06.2016 / 16:55