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

Adding records (Row/ Column) to DataGridView; Collection already belongs to a DataGridView control VB.NET

I'm looking for some help with an issue I am having. I have multiple text files, in a folder. The folder can have an "unlimited" amount of text files in it, although typically 2-150 files http://gyazo.com/5f314d1ca374abf9f813914609dd931d (images…
0
votes
1 answer

Setting returning value of a function as data of Datagridview Colomn

I want to set returning value of a function as data of one of my Datagridview column in C#. for example : public class MyMath { public int X { get; set; } public int Y { get; set; } } public class…
Armin
  • 599
  • 2
  • 8
  • 19
0
votes
1 answer

Is it possible to add image in an DataGridViewTextBoxColumn dynamically?

I have a DataGridViewTextBoxColumn in which i want add text and image in different rows according to some condition. For ex:- If Row# == 1 then add Text and If Row# == 2 then add Image. I don't want to change the column type. Is it possible…
user2691432
  • 93
  • 1
  • 2
  • 10
0
votes
0 answers

Combo Box inside the DataGridView of WinForm application

Using ComboBox in DataGridView : Implementation : DataGridView is binding with the datatable, when use click over any row, than this row cell element convert into ComboBox and now user able to select ComboBox elements . Issue : It is working fine…
0
votes
2 answers

How to maintain aspect ratio of datagridview column width when win form resize

I have one win form and there is one grid. Grid dock property is set to fill. When I bind my grid with data then I also mention all column width like this way. dgList.DataSource = ds.Tables[0]; dgList.Columns[0].Width = 100; dgList.Columns[1].Width…
Thomas
  • 33,544
  • 126
  • 357
  • 626
0
votes
2 answers

Can't add column to datagridview programmatically in visual basic.net using method in class

i want to ask something about datagridview in visual basic i have 1 form name 'form1' and 1 class name 'test' in my project, within the class there is 1 method 'addColumn()'. i want to add column to datagridview programmatically, when i add directly…
user3339700
  • 3
  • 1
  • 2
0
votes
1 answer

vb.net datagridview custom format

i have a datagridview the contents are as follows when i load the datagridview for the column Payment ID i want the IDs to be like P00001 i know i have to use the mask \P99999 but the question is how? any help would be appreciated thanks in…
asdf
  • 460
  • 1
  • 10
  • 31
0
votes
1 answer

Search DataGridView for Integer Then Select Row

The below code should search DataGridView1 which is on the LeaderAccessTable form for an integer that the user inputs into SendFromID, if the DataGridView1's first column contains what the integer that the user has entered into SendFromID then the…
user3224987
  • 83
  • 3
  • 12
0
votes
2 answers

define an event for DataGridViewColumn ReadOnly property

I have a DataGridView with some columns and I change their ReadOnly property values programmatically. But I need an event which will rise (or give me a chance to do whatever I want) when this value changes. Now I have two questions: 1- Could I…
0
votes
2 answers

Strange behaviour on DataGridView, focused cells do not scroll horizontally

Try this... Create Form1, don't change size, add a dataGridView1 and set its anchor to left, top and right, then... public class Form1 : Form { public Form1() { InitializeComponent(); dataGridView1.AutoGenerateColumns =…
Shin
  • 664
  • 2
  • 13
  • 30
0
votes
1 answer

How to bind labels from AspxGridView?

I used Dx AspxGridView.And I tried bind some labels from this grid. I have a row in this grid and there are 12 column. I want to be like this : Label1.Tex=Value of Column1 Label2.Tex=Value of Column2 Label3.Tex=Value of Column3 . . .
Mhmt
  • 759
  • 3
  • 22
  • 45
0
votes
4 answers

How to perform multiplication on two column for datagrid view and assigning it in third column?

Here is my code, I am trying to display multiplication of Rate * Supply column values and assigning it to the Amount column in data grid view : try { Query = "Select id,Code,Description,Rate,Cust_Id,Supply,Empty,Amount,Received from Items "; …
user3012262
  • 67
  • 2
  • 12
0
votes
1 answer

Setting DataGridViewComboBoxColumn.Valuemember to a list

I needed to know if one can set the ValueMember property of a DataGridViewComboBoxColumn directly from a list of strings. e.g. List productNames = new List(); List t = new List(); foreach (var p…
Kinyanjui Kamau
  • 1,890
  • 10
  • 55
  • 95
0
votes
1 answer

datagridview manually filled column value initially not showed

I have an application with multiple datagridviews in a tabcontrol. One of the tabcontrols has 4 columns that are filled by the datasource. I don't use autogenerate columns, but use the DataPropertyName to bind values to the columns. I also have 2…
RazorEater
  • 265
  • 2
  • 14
0
votes
0 answers

Set value for DataGridViewColumn just add to DataGridView

I have a dataGridView. Now I want to add new columns to this and then set value for this columns. This my code DataGridViewColumn texBoxColumn = new DataGridViewColumn(); DataGridViewCell cell = new DataGridViewTextBoxCell(); texBoxColumn .Name =…
Cong Tran
  • 1,448
  • 14
  • 30