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

WPF Datagrid Colum ActualWidth incorrect - Wait for ObservableCollection to finish update

I´m kind of stuck here with a little problem. I´ve got a DataGrid whose ItemSource is fed by an ObservableCollection. (I´m creating a little plugin for Revit). My ObservableCollection contains of some Elements which are created when doing a…
codenox
  • 51
  • 1
  • 6
-2
votes
2 answers

Asp.net code behind not to export empty columns from a gridview to excel

My asp.net page has grid-view with 5 columns. I export them to excel but I get empty column as well. Here is my code in C# asp.net code behind; protected void ExportToExcel(object sender, EventArgs e) { string nowT =…
NTMS
  • 816
  • 7
  • 22
-3
votes
1 answer

How to get value of first column when selecting a row in datagridview c#

I want to store on a variable the value of the first column of a row whenever I click on a cell.
-3
votes
2 answers

Index was out of range. Must be non-negative and less than the size of the collection. setting width column

I'm facing problem in setting width of GridView columns programatically. I've dynamically bind data from sql source as: public void BindGrid() { SqlConnection con = new SqlConnection("Data Source=MEHDI-PC\\SQLEXPRESS;…
-4
votes
1 answer

How can I search more columns in DataGridView in C#

I want to search more columns from the DatagridView. I am able to only search the product name, but I also want to search the Brand name and Category name. How can I achieve this? Here is my code: public void LoadProducts() { int i =…
-6
votes
2 answers

How to get ToolTip from WPF Data Grid Column Header (DataGridTemplateColumn) in code?

I set Tooltip for a DataGridTemplateColumn like this:
Joan Venge
  • 315,713
  • 212
  • 479
  • 689
1 2 3
34
35