When I use SQL statement such as
select
ID as ID,
Name as CustomerName,
Day1 as BirthDay,
Day2 as MemberDay
from [Customer]
to populate a DataGridView
(Named poorly for demonstration purpose),
It will name the columns' Name AND HeaderText automatically. (Both ID, CustomerName, BirthDay, and MemberDay)
Is there a way to set the Name and HeaderText differently from the SQL statement itself?
Or I just have to rename each HeaderText individually?
Thank you very much for your help!
Edit
Because the SQL statement might be different depend on the user's choice, so it'll be tedious to rename each HeaderText.
Of course it's not impossible to do, but I have to consider all possible situations and handle it accordingly, possible but tiresome and bad practice.
And mostly importantly, it needs to be written back to the database from the DataGridView
once the user edited the content.
And I can't find the original column name from the DataGridView
itself, that's why I'm trying to looking for a better way to resolve it.
Thank you very much for you help!