I have a DataGridView object on my form that is linked to a dataTable populated based on a variable SQL query. I use the DefaultCellStyle.Format and Alignment properties based on the datatype of the column to adjust the display style for the end user.
DataGridView1.Columns.Item("InvoiceAmt").Width = 90
DataGridView1.Columns.Item("InvoiceAmt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
DataGridView1.Columns.Item("InvoiceAmt").DefaultCellStyle.Format = "c" 'currency
My problem comes with the way that negative values are displayed with the .DefaultCellStyle.Format value set to "c" for currency. For some reason, it places negative values within parenthesis, i.e. ($2250.45) instead of -$2250.45
Is there a way I can fix this to properly display the information? Any suggestions and help are appreciated. Thank you in advance.