G
Guest
I have a few DataGridView questions that hopefully someone will be able to
help me with some or all of them.
1) I have a DataGridView that is bound to a DataTable (DataSource set to a
table). When I progromatically add a row to the DataTable the DataGridView is
updated as it should be. The problem comes with editing. I have marked some
of the columns in the designer as ReadOnly = False, but for some reason I am
not able to edit the new added row. I look at the property in the debugger
and it is still ReadOnly = False but I still cannot edit the cell for the
column that I marked ReadOnly = False. I saw in the documentation that the
ReadOnly attribute for the row takes precedence over the column attribute.
Maybe this is what is happening? How do I set the ReadOnly property for the
row? Or more precisely how do I enable one or more columns for editting?
2) I handle a CellFormatting event and change certain columns display value
to a proper currency format. Now I would like to change the alignment so the
decimal points line up. It seems that the default alignment is to the left.
How do I change the alignment of the values in a column to be right-aligned?
Thank you.
Kevin
help me with some or all of them.
1) I have a DataGridView that is bound to a DataTable (DataSource set to a
table). When I progromatically add a row to the DataTable the DataGridView is
updated as it should be. The problem comes with editing. I have marked some
of the columns in the designer as ReadOnly = False, but for some reason I am
not able to edit the new added row. I look at the property in the debugger
and it is still ReadOnly = False but I still cannot edit the cell for the
column that I marked ReadOnly = False. I saw in the documentation that the
ReadOnly attribute for the row takes precedence over the column attribute.
Maybe this is what is happening? How do I set the ReadOnly property for the
row? Or more precisely how do I enable one or more columns for editting?
2) I handle a CellFormatting event and change certain columns display value
to a proper currency format. Now I would like to change the alignment so the
decimal points line up. It seems that the default alignment is to the left.
How do I change the alignment of the values in a column to be right-aligned?
Thank you.
Kevin