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
2 answers

How to make DataGridViewLinkColumn underline and change background color

I have a DataGridViewLinkColumn.How can I make the header(row = -1) as underline and change it's background color var WarningsColumn = new DataGridViewLinkColumn { Name = @"Warnings", HeaderText =…
priyanka.sarkar
  • 25,766
  • 43
  • 127
  • 173
0
votes
2 answers

Changing cursor to "I-beam" when mousing over a read-only column in datagridview

I'm using Visual Basic 2012 and I'm working with a datagridview populated by an excel 2010 macro workbook. Some of the columns within my datagridview are read-only columns and I would like the cursor to change from the default cursor to an I-beam…
stackexchange12
  • 622
  • 9
  • 20
  • 41
0
votes
1 answer

Setting backgroundcolors in DataGridViewCells depending on the value from SQL (VB.Net winforms)

As the title says. I collect a bunch of values from a SQL Compact DB, and puts them into a DataGridView. One cell ("Status" in this case) contains a varchar field. I want to set the background color of this field depending on its value. For…
gubbfett
  • 2,157
  • 6
  • 32
  • 54
0
votes
1 answer

Rearrange Order number column of DataGridView after user sorting one of its columns?

My DataGridView has a fixed column (the first one of the grid's columns) called "Order", this column should have values of ordinal numbers from 1 to the count of rows of the DataGridView (1,2,3,4,...,n) and this order shouldn't be changed. But when…
King King
  • 61,710
  • 16
  • 105
  • 130
0
votes
1 answer

How to Insert UserControl TextBox to DataGridView in C#?

In Sql Server 2005, In Form Load I write this Code. txtPrprCase is a UserControl and validates First Character to Capital. How to i add this Control to DataGridView. I try the Following Code. But it does not Work. ciscontrols.txtPrprCase txt = new…
user1982736
0
votes
1 answer

Asp.Net GridView adding Template Field Columns at Runtime

I am using GridView in ASP.NET with C#. I am adding Templete Field Columns to GridView on Runtime, Columns are added successfully with the required text in rows. But after filling GridView perform any button click event controls from rows removes,…
Shahid Iqbal
  • 2,095
  • 8
  • 31
  • 51
0
votes
1 answer

How to determine which column is dragged in datagridview in c# winform

In C# 4.0 winform application. I have a DataGridView with some columns, it's AllowUserToOrderColumns = true, user can change columns position by dragging it. When user dragged a column i want to know which column is dragged and where it is now.
0
votes
2 answers

In DatagridView, by column, I would like to have the column's ToolTipText gather data from other columns in the same row?

I have a column that has a time that the appointment starts and two to three others the length of the row's appointment, depending on the type. I would like to set the tooltip for the start time to show the ending time for that appointment equals…
user1190265
  • 203
  • 1
  • 2
  • 5
0
votes
1 answer

vb.net call datagridview column sizing method

I've build a custom header for a datagridview that allows me to easily search through the data. In this custom header, I've created controls that allow you to click and drag to resize the datagridview columns. My column resizing code works just…
TACHEON
  • 67
  • 1
  • 2
  • 6
0
votes
1 answer

select column from gridview and pass to variable

Below is the code from where i tried to select the column data from the 10, however code is not working as it should be string strSuppId = GridView1.SelectedRow.Cells[10].Text; ERROR MSG:Object reference not set to an instance of an object. my…
0
votes
1 answer

extjs 4 How to change ordering of shown column dropdown on grid

Using extjs 4.1.1 I have a grid with lots of columns >20. Initially, most of these columns are hidden. If a user wants to unhide the column, they select the menu on any column, then select the "columns" choice, this expands another dropdown/dropout…
Bbb
  • 271
  • 2
  • 8
  • 22
0
votes
3 answers

How to set colums to be comboboxes

I have populated a DataGridView from a dataTable. I wan't some columns to appear as comboboxes, dropdowns. How do I do this? My code sofar: DataTable dt = dataBase.getData(); this.dataGridView1.DataSource = dt; //set some columns to comboboxes
McDermott
  • 1,025
  • 2
  • 16
  • 28
0
votes
2 answers

Trouble adding values in combobox column of datagridview c#

I have a datagridview, in this datagirdview, i added two unbound columns, one is a combobox and second is a textbox type column, besides this , I have a datatable of some rows. I am setting gird datasource with my datatable, then I am trying to add…
alphaprolix
  • 601
  • 2
  • 10
  • 25
0
votes
1 answer

Order Columns in JqGrid

I have this declaration on my script and i want to choose the columns that can see on it.. $("#list").jqGrid({ url: '/persons.ashx', datatype: 'xml', mtype: 'GET', colNames: ['Name', 'Age'], …
bombai
  • 927
  • 1
  • 17
  • 27
0
votes
1 answer

DataGridViewColumn properties not propagating down to control

I'm am working through an example over at the MSDN website for Hosting custom controls within the datagridview. The Problem that I am running into is that I have a Property on the DataGridviewColumn that can be set at design time but it is not…
Scott
  • 11,046
  • 10
  • 51
  • 83