I am using Linq to pull data for grid, so properties has to be set by coding such as header text, cell format, and size.
I tried below code and it causes this error, "Object reference not set to an instance of an object."
Is there any way that I can set properties by coding before data is pulled?
Private Sub frmEmployee_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
It throws an exception because the columns have not been loaded, or that column was not found.
Usually you should change the HeaderText on the column on DataBindingComplete event, because here you are sure that all the data has been loaded for the grid.