******************************************************************** * Description.......: AdjustGrid - replaces grid's headers with headers based on class * Calling Samples...: * Parameter List....: * Created by........: Nadya Nosonovsky 06/24/2002 09:22:36 AM * Modified by.......: ******************************************************************** for each oColumn in thisform.pgfMMR.Page1.grdViewResult.columns for each loObject in oColumn.controls if lower(loObject.class)="header" lcCaption=loObject.caption oColumn.removeobject("Header1") oColumn.newobject("Header1",'myHeader','myHeader.prg',"",m.lcCaption) with oColumn.Header1 .name="Header1" .caption = m.lcCaption .fontbold=.t. .alignment=2 .lDontChangeOthers = .t. .statusbartext = oColumn.comment .tooltiptext = oColumn.comment .cTagName = oColumn.tag .lNoActiveHighlight = .t. endwith endif next nextNote, that you have to define your header class in the program.