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
0
votes
1 answer

Is it possible to derive a DataGridView Column such that it can store an object of any sort?

I have a DataGridView that loads information from files and stores that information. The information is kept in a class form for use so I was thinking rather than have to reconstruct that class object from the data stored in the DGV, it would be…
Will
  • 3,413
  • 7
  • 50
  • 107
0
votes
3 answers

Exporting Gridview table to Excel

im exporting a gridview table to Microsoft Excel using this code : private void button5_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Excel.Application Excel = new Microsoft.Office.Interop.Excel.Application(); …
0
votes
1 answer

How to make custom DataGridView to add specific DataGridViewColumns only in C# design time?

I know there are 6 types of ColumnType to select in DataGridView control in C#. DataGridViewButtonColumn DataGridViewCheckBoxColumn DataGridViewComboBoxColumn DataGridViewImageColumn DataGridViewLinkColumn DataGridViewTextBoxColumn In design time,…
Joshua Son
  • 1,839
  • 6
  • 31
  • 51
0
votes
1 answer

DevExpress Grid Custom Column Sizing calculation based on Grid Width

My project needs to display a list of contacts in a grid. Normal data - First Name, Last, City, State, Zip, Email, Phone, Company Name. 1 - We need to support wide variation in screen widths 800px -> 2,000px. 2 - We want to display as much…
dbower60
  • 87
  • 6
0
votes
1 answer

How can flashing cursor when doing edit in a GridColumn in a Xtra Grid Control

I am using a Xtra Grid Control (Dev express 11.2). All columns are Read Only AllowEdit = false and I have created a function witch user can make Right-Clickand choose edit in a column, then this column if is 'amaColumn' or 'phoneColumn' then…
A. Zalonis
  • 1,599
  • 6
  • 26
  • 41
0
votes
1 answer

Move column in DataGridView without clicking on it twice

Normally, to move a column in a DataGridView, you just click and drag. However, if you scroll immediately before this operation (which is quite common if you are moving columns), then you must click on the column before the click-and-drag. I thought…
Little Endian
  • 784
  • 8
  • 19
0
votes
2 answers

How can I make custom DataGridViewColumn properties work at design time?

Recently I've written a custom DataGridViewColumn to host a progress bar. The column class itself has a property that I'd like to propagate to all the cells of the column. I use this code to implement it:- _ Public Property…
Niya
  • 243
  • 2
  • 8
0
votes
1 answer

To find the number of rows in DataGridView where the values are between specified range?

One column of my DataGridView contains a number of different values. For example: columnName 10 21 23 25 12 14 16 28 30 29 36 47 56 65 78 89 96 121 126 21 132 …
Vigna
  • 113
  • 1
  • 5
  • 13
0
votes
1 answer

How to find the number of rows in a DataGridView where the values in a column are within a specified range?

One column of my DataGridView contains a number of different values. For example: columnName 10 21 23 25 12 14 16 28 30 29 36 47 56 65 78 89 96 121 126 21 132 55 16 ... etc Here I need to separate the values which lies between the range 0-30,…
Vigna
  • 113
  • 1
  • 5
  • 13
0
votes
0 answers

How to change the value of data lines in DataGridView (not all lines)

How can I change the value of data lines in the third colomn of the dgv, with this code,I can change the value of all lines in the third column of the dgv but I want only the lines in which I have data. private void button4_Click(object sender,…
Lina
  • 451
  • 1
  • 8
  • 23
0
votes
1 answer

How to make combo box column selectable if ReadOnly property of the DataGridView set to true?

I have DataGridView it's contains 4 columns, one of the column is DataGridViewComboBoxColumn. In DataGridView I want to prevent user to delete, edit, add rows in data grid view, so I set the ReadOnly property of the DdataGgridView to true. My…
Michael
  • 13,950
  • 57
  • 145
  • 288
0
votes
1 answer

how can we save the header of a datagridview in the database without adding a new row in the database?

This is what our form looks like: InstructorsID CourseCode Section Surname FirstName MiddleName Date1 Date2 Date3 Date4 Date5 Date6 Date7 Date8 Date9 TotalAbsent Present EquivalentGrade …
0
votes
2 answers

how can we loop the column and row in the datagridview?

Let me tell you what we wanted to do, the user has to click every check box because it represents the number of the students attendance and once the user click the button 1 it will show the total number of days present and the button 2 is for the…
Juri14
  • 13
  • 1
  • 1
  • 8
0
votes
1 answer

add image to a datagridview cell.

C# hello, im trying to make a database with 6 columns (id, Brand, Model, Part, Info and Image) i have everything setup correctly i can add new row( without image) and i have also made the row selectable to view more information on the "Info Column"…
0
votes
1 answer

How to disable button column in the datagridview for selected data

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dataGridView1.Columns["RESER"].Index) { SelectedITEMID =…