Home:ALL Converter>DataGridView: can you add an unbound column to a Data Bound grid?

DataGridView: can you add an unbound column to a Data Bound grid?

Ask Time:2010-06-16T21:57:41         Author:Jack Johnstone

Json Formatter

I´m using Visual Studio 2008, C#

DataGridView: can you add an unbound column to a Data Bound grid?

It seems pretty simple, just select the properties ("DataGridView Tasks box") for the data bound DataGridView, and select Add unbound column. However, when in runtime there will be a System.FormatException - which I can understand, as I don´t know how to "initialize" the cells in the new unbound columns.

I was planning initializing it programmatically via CellFormatting event - but so far I´m failing.

Any tips? Just want to get it up and running in SOME way...

Author:Jack Johnstone,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/3053887/datagridview-can-you-add-an-unbound-column-to-a-data-bound-grid
yy