Questions tagged [datagridviewcolumn]

In WinForms DataGridViewColumn class represents a column in a DataGridView control.

In WinForms DataGridViewColumn class represents a column in a DataGridView control.

516 questions
-1
votes
1 answer

How to concatenate two columns from MySQL DataTable in the Datagrid View of Visual Studio 2019?

I'm sorry if my question is quite simple, I am a college student trying to explore database connections in visual studio. I was able to display values from my database table in the datagrid view but I was wondering how to concatenate two columns and…
-1
votes
1 answer

How to move two Datagridview columns together

I have a datagridview where I have allowed the user to reorder columns. However, when the user moves a column to another place I'd like the adjacent column (visibility = false) to move with it. I've tried to do it in the ColumnDisplayIndexChanged…
bikbak
  • 7
  • 1
-1
votes
1 answer

How to insert columns and rows with data in Lists into DataGridView (C# , Windows Forms)

This project is based on Windows Forms (.NET Framework) , C#. Let's say that I have 3 Lists with values respectively named; List ListAlternatives = new List(); List ListParameters = new List(); List ListWeight =…
-1
votes
1 answer

Two check boxes in one data grid view column

How to add two checkboxes in the data grid view column?
Nandu
  • 103
  • 9
-1
votes
1 answer

Displaying negative values in a DataGridView without parentheses

I have a DataGridView object on my form that is linked to a dataTable populated based on a variable SQL query. My problem comes with the way that negative values are displayed with the .DefaultCellStyle.Format value set to "c" for currency. For…
user2757352
-1
votes
1 answer

How to get a DataGridViewColumn by it's HeaderText Property?

How do I get a column of a data grid view by the header text rather than by the index or name property? What I tried so far is the my intuitive approach: // Identifiers used are: string myHeaderText = "Header Text"; dataGridViewColumn =…
G. LC
  • 794
  • 1
  • 8
  • 27
-1
votes
1 answer

Validate a Column in DataGridView using File.ReadAllLines?

I am doing a validation on a certain column called "KPI". What I'm doing is making a .txt file that will be used for validation of the column. The .txt file looks like this. As you can see in the notepad, it has 4 values. Revenue Sales…
Shan Coralde
  • 214
  • 2
  • 15
-1
votes
1 answer

C# Updating Dataset and DataGridView

So im trying to have a DataGridView that is connected to a database, with some text boxes and a button to add more data to the DB. I can have it update the table, but cant get it to properly update the Database. using System; using…
K.Denn
  • 13
  • 4
-1
votes
1 answer

values are not transforming in datagridview as per condition c#

I want to change the value of datagridview column according to the condition if the cell.value is minimum of the all values the cell must contain "L" , that is low. If the value is highest of all the cell.value = "H" rest should be medium. This is…
sarim
  • 1
  • 2
-1
votes
2 answers

Changing width of a column from gridview

I with this code marking the first column from DataGridView: for (int i = 0; i < dataGridView1.Rows.Count; i++) { dataGridView1.Rows[i].HeaderCell.Value = (i + 1).ToString(); } but because the low width, the numbers are not shown properly, how…
alireza25
  • 13
  • 2
-1
votes
1 answer

calculate rank from student marks stored in datatable in vb. net

I am working on examination result system in vb.net which requires to calculate student ranks based on marks obtained. Subject marks data is stored in database. I am loading the subject marks in a datatable da.Fill(dt) 'added to a datagridview. …
Vehlad
  • 155
  • 2
  • 10
  • 20
-1
votes
1 answer

Add values just to one column in DataGridView C#

I have a DataGridView with 6 columns; I want the first column to display the days of the week. And the second column should display a schedule per day. But I want them to display in vertical order, not in horizontal way. But I can't figure out how…
ChrisCreateBoss
  • 323
  • 7
  • 21
-1
votes
1 answer

How To add a gridview to Datagridview cell

I want to have a grid view like this image I find out that I should have a gridview in datagridview cell so I tried to find how to do that.I finally find that there is not any DataGridViewcolumn type like DataGridViewTextBoxColumn and etc,So I…
Majid Hojati
  • 1,740
  • 4
  • 29
  • 61
-1
votes
1 answer

how to compute the value in the cells of a datagridview?

Subj Sec FN LN MI 05/22/14 05/23/14 05/24/14 05/25/14 05/26/14 P A EQ Comp103 I-A Ana Lin G. (checked) (checked) (unchecked)(checked) (checked) 4 1 72 To compute the equivalent grade , we use this formula "(4/9*50)+50",…
Juri14
  • 13
  • 1
  • 1
  • 8
-1
votes
1 answer

Insert into Microsoft Access database in VB.Net

I'm trying to develop a system which will be used by admin department to key in lecturer and student data. There will by many changes on the columns, the student might register other subjects such as Subject 10, Subject 11 and so on. And the…
Lorek Bryanson
  • 195
  • 1
  • 7
  • 22
1 2 3
34
35