How do I set columnNames for a dataGridView bound to a List?

This works.. using System. ComponentModel; List EquipList = new List(); DataGridView. Datasource = EquipList; below:the first two properties in the class will be displayed with with their new names, the third property will not display as per the Browsable attribute.

Public class equip { DisplayName("Equipment ID") public int EquipID {get;set;} DisplayName("Equipment Name") public string EquipName {get;set;} Browsable(false) public int recordId {get; private set;} }.

1, for RAD projects I'll always do this – Saeed Amiri Apr 5 at 13:00.

You can try this DataGridViewTextBoxColumn dt = new DataGridViewTextBoxColumn(); dt. DataPropertyName = "EquipName"; //Property to bind. Dt.

HeaderText = "Name"; dataGridView1.Columns. Add(dt); You can achieve this easily with Designer.

Thats just so long and laborious – Brad Apr 5 at 12:42.

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


Thank You!
send