Mayank Jani

Mayank Jani

  • NA
  • 477
  • 72.8k

Format DGV cell based on database values.

Mar 6 2018 12:03 PM
Hi Members,
 
I am working on a C# WinApp and I have a dgv on a form and that contains single column.
I want to fill the dgv with data stored in a table. I have stored details of font, font-size, bold, italic and underline in different fields.
when the form get load, the dgv cells should be formatted as per database values. i.e. if the values for the first cell are, Arial, 15, true, false, true. it should appear with font Arial, font size 15, bold, no italic and with underline. the second cell's values will be Times, 12, false, false, true. it will appear as so. and so on.
 
in short, please let me know the code for formatting dgv cell based on database value.
 
Thank You.
 
Mayank Jani