I have dynamically created DataGridView control on form, with DataSource specified as:
((DataGridView)createdControl).DataSource = (IList)(p.GetValue(editedClient, null));
where IList is defined as generic collection for following class:
public class CDocumentOperation
{
[DisplayName(@"Time")]
public DateTime TimePosted { get; set; }
[DisplayName(@"User")]
public CUser User { get; set; }
[DisplayName(@"Action")]
public string Action { get; set; }
}
grid is populated successfully with data, but the only problem that all columns
are created as Text fields.What I need is to manually convert column
which binds to User field, to have Buttons or Links (convert column type to DataGridViewButtonColumn
).
Can I do this, without modifying grid auto-fill on grid post creation, without manual column creation of appropriate type and data copying ?