T thomas008 Well-known member Joined Feb 17, 2009 Messages 54 Location Belgium Programming Experience Beginner Mar 24, 2009 #1 I want to format a column in my gridview differently depending on a variable. Can this be done?
cjard Well-known member Joined Apr 25, 2006 Messages 7,081 Programming Experience 10+ Mar 24, 2009 #2 Where is the variable? Upvote 0 Downvote
T thomas008 Well-known member Joined Feb 17, 2009 Messages 54 Location Belgium Programming Experience Beginner Mar 25, 2009 #3 Its in my code. Its a boolean and i want to give some columns of my datagridview another format when the boolean is true opposed to when its false. Upvote 0 Downvote
Its in my code. Its a boolean and i want to give some columns of my datagridview another format when the boolean is true opposed to when its false.
T thomas008 Well-known member Joined Feb 17, 2009 Messages 54 Location Belgium Programming Experience Beginner Mar 25, 2009 #4 Ok i found how to format the columns. VB.NET: Me.dataGridView1.Columns("UnitPrice").DefaultCellStyle.Format = "c" Found on: How to: Format Data in the Windows Forms DataGridView Control Upvote 0 Downvote
Ok i found how to format the columns. VB.NET: Me.dataGridView1.Columns("UnitPrice").DefaultCellStyle.Format = "c" Found on: How to: Format Data in the Windows Forms DataGridView Control
cjard Well-known member Joined Apr 25, 2006 Messages 7,081 Programming Experience 10+ Mar 25, 2009 #5 (If it was based on the data in the row itself, I'd have advocated using a .Expression) Upvote 0 Downvote