Hi David,
I'm guessing the problem has to do with the grid's AutoGeneratingColumns property-- perhaps the bound columns are being
autogenerated, which causes the unbound column to slide to the left.
Is that what is happening?
I believe so.
Will "AutoGenerateColumns = false" solve the problem?
I don't think so because you'll lose all of your bound columns at runtime, unless this is acceptable.
For each column that is being auto-generated add a column to the DataGridView in the designer just as you would an unbound column,
but set the DataPropertyName for each bound column to the name of the DataColumn to which it is bound. You don't have to modify the
AutoGenerateColumns property if you setup the control like I've suggested. You could, however set AutoGeneratingColumns to false
so that you don't have to explicitly define all of the columns but the columns that are not explicitly defined will not be added at
runtime.
--
Dave Sexton
"David Veeneman" <da****@nospam.com (domain is my last name)wrote in message news:en**************@TK2MSFTNGP03.phx.gbl...
I've added an unbound column to a bound DataGridView, and I want the unbound column to be the last column in the grid. But
whenever I recompile, the unbound column is the first column in the grid.
I'm guessing the problem has to do with the grid's AutoGeneratingColumns property-- perhaps the bound columns are being
autogenerated, which causes the unbound column to slide to the left.
Is that what is happening? Will "AutoGenerateColumns = false" solve the problem? where would I put the statement?
Thanks in advance.
--
David Veeneman
Foresight Systems