I have about DataGridView that is Bound to mDataTable
I want to format the "Price" Column as a positive currency and the "Coupon" Column as negative Currency and I cant figure out how to do it.
I have this in the designer.vb but it has always been there, but has never worked.
[/CODE]
Code:
Public Class Grocery_List
Dim mDataTable As New DataTable
Private Sub BindGrid()
mDataTable.Columns.Add("Item")
mDataTable.Columns.Add("Brand")
'mDataTable.Columns.Add("PriceMatch")
mDataTable.Columns.Add("Store")
mDataTable.Columns.Add("Price")
mDataTable.Columns.Add("QTY")
mDataTable.Columns.Add("Coupon")
ShoppingListView.DataSource = mDataTable
End Sub
I have this in the designer.vb but it has always been there, but has never worked.
Code:
'clmPrice
'
Me.clmPrice.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells
Me.clmPrice.DataPropertyName = "Price"
DataGridViewCellStyle2.Format = "C2"
DataGridViewCellStyle2.NullValue = Nothing
Me.clmPrice.DefaultCellStyle = DataGridViewCellStyle2
Me.clmPrice.FillWeight = 20.77344!
Me.clmPrice.HeaderText = "Price"
Me.clmPrice.Name = "clmPrice"
Me.clmPrice.Width = 56