This function auto sets size of ColumnHeaders according the record's length.
Assumes
It simply calculates the longest entry in each record and sets the size of ColumnHeader. There is an option if you would like to enlarge the column headers if there will be availabe space. This is my second code in pscode, so please vote for me.