C#, Set datagridview column format after datasource has been set?

Var persons = new {new {name = "aaa", salary = 40000}, new {name = "aaa", salary = 40000}, new {name = "aaa", salary = 40000}, new {name = "aaa", salary = 40000}}; GridView1. DataSource = persons; GridView1. AutoGenerateColumns = false; var NameField = new BoundField(); NameField.

HeaderText = "Name"; NameField. DataField = "name"; GridView1.Columns. Add(NameField); var SalaryField = new BoundField(); SalaryField.

HeaderText = "Salary"; SalaryField. DataField = "salary"; SalaryField. DataFormatString = "{0:c2}"; SalaryField.

HtmlEncode = false; GridView1.Columns. Add(SalaryField); GridView1.DataBind().

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions