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
6
votes
3 answers

How can I detect the cell value changed of a specific datagridview column? - VB.NET

I want to detect the cell value has been changed of a specific column. My Datagridview name is DGV_Products and it has 6 columns. Product ID | Descriptions | Quantity | Unit Price | Discount | Amount G 01 | Gallon #01 | 2 | 1850 …
Muhammad Saqib
  • 2,185
  • 3
  • 35
  • 48
6
votes
2 answers

DataGridView's Column name not found

Why do I get the exception that Column Name is not found for MyEntity as well as FullName Columns? Although I see the column names being displayed in UI. InitializeComponent(); dataGridView1.SelectionMode =…
user1298925
  • 2,304
  • 7
  • 29
  • 43
5
votes
1 answer

Validation on a single DataGridView column

How can I perform validation on a particular DataGridViewTextBoxColumn column in my DataGridView, so that a user is required to enter a value into it?
Abid Ali
  • 1,731
  • 8
  • 26
  • 62
5
votes
2 answers

Hide/Disable DataGridView Column/Row Resizing Line

Does anybody know a way of disabling the line that appears when resizing datagridview rows and columns. This line flickers a lot, so I'd rather draw my own solid line myself and disable the default one. I was hoping by drawing my own thick line…
Jarron
  • 1,049
  • 2
  • 13
  • 29
5
votes
1 answer

how to remove row indicator column from datagridview in winforms c#

Please see the attached screenshot. How do I avoid/delete the extra column marked in red? Basically this column act as a row indicator.
pk786
  • 2,140
  • 3
  • 18
  • 24
5
votes
2 answers

Get and Set sortation (Column and Ascending/Descending) of a DataGridView

I'm having a small problem. I need to save the sortation (by which Column and Ascending or Descending) and load it on the next start of the program. Getting the currently selected Column is no problem i do this via private int GetSortColumn() …
reijin
  • 121
  • 3
  • 9
5
votes
2 answers

Calculation Columns in DataGridView bounded to an object

My UI consist of a datagridview (AutoCreateColumns= false) bound to a list of my business objects. Let's assume my Object contains 2 columns - Price and Quantity - and I'd want to add a new column in my grid - Total - which value will be calculated…
DreadAngel
  • 772
  • 11
  • 30
4
votes
1 answer

how to get DateTimePicker checkstate value of DataGridView?

I have a DataGridview in which there is a DataTimePickerColumn, and it's DateTimePickerCell contain checkstate. How do I get the checkstate value after editing the checkstate?
4
votes
2 answers

DataGridviewComboBox requires 2 clicks to show the list of items

Possible Duplicate: Open dropdown(in a datagrid view) items on a single click We have a DataGridView where one column is a ComboBox with the DropDownButton style. The DataGridView is in FullRowSelect mode. Let's assume that I have 5 rows, and row…
4
votes
0 answers

C# VS2008 - why are my DataGridViewCellStyle variables automatically renamed?

FIRST POST! Been lurking for years, but Googling on this issue hasn't turned up any results. So here goes... I have several C# WinForms apps exhibiting this behavior in Visual Studio 2008, but I think I noticed this same problem back when I was…
Jeff Elliott
  • 113
  • 8
4
votes
5 answers

How can I set the direction of a string in a DataGridViewCell?

How do I set the RightToLeft property for a particular DataGridViewCell in a DataGridViewColumn?
mbmsit
  • 63
  • 1
  • 7
4
votes
2 answers

Masking password column in datagridview

I'm having problem with masking the password column. The code below works, but it doesnt work the way I want. While editing it do mask the password but when I am done and continue to the next datagridviewcell password becomes visible. private void…
BarisY
  • 171
  • 2
  • 4
  • 14
4
votes
2 answers

Why do Columns not stay hidden after calling DataGridView.Columns.Clear()?

I have seen a lot of posts on SO about weird behaviour of Columns and their visibility in particular when refreshing the grid and dynamically building the columns in the list, but haven't found a satisfactory solution. After some digging I am almost…
user692942
  • 16,398
  • 7
  • 76
  • 175
4
votes
1 answer

C# WinForms: Cannot access a dispose object

I have a datagridview. This datagridview has customs datagridviewcolumns among other like datagridviewtextboxcolumns. Third-party control is hosted in each cell. So as datagridview is designed, on custom cells, content cannot be shown unless you are…
Willy
  • 9,848
  • 22
  • 141
  • 284
4
votes
1 answer

Datagridview Column width

I have problem related to datagridview in Winform. I have a list of table names in my left panel. When I click on Table I show the table content in right panel. I am showing data in a datagridview by fetching data and assigning datasource to dgv. I…
Hardik
  • 1,716
  • 6
  • 27
  • 41
1
2
3
34 35