As you probably know, when you use expandable views on the Web, the columns are set to the width dynamically by the content of the column, which means that all headers of the columns are show as one string. (ugly!) By using HTML columns generated by the view, we can eliminate this and set our own start width. You can even set the maximum width when you expand this method with the following:
Value:=@Left(FIELD1;20)+Div+@Left(FIELD2;20)+div+@Left(FIELD3;20)+div+@
Left(FIELD4;20)+div+@Left(FIELD5;20)+div+@Left(FIELD6;20)+div+@Left(FIELD7;20);
Use a HIDDEN first column when you want to sort the content in a NONE categorized view, or use a First categorized column which is not hidden and don't show this field with the function.
Replace the fieldnames in the values string in the example with your fieldnames and define in the Width string the width of the columns you want to use.
DB:="/"+@ReplaceSubstring(@Subset(@Name([CN];@DbName);-
1);"";"/")+"/"; Div:="##!!##"; Value:=FIELD1+Div+FIELD2+div+FIELD3+div+FIELD4+div+FIELD5+div+FIELD6+div+FIELD7; Width:="50"+div+"30"+div+"120"+div+"60"+div+"60"+div+"60"+div+"60"; COLUMN1:="[<TD NOWRAP WIDTH="+@Word(Width;div;1)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;1)+"</A></FONT></TD>]"; COLUMN2:="[<TD NOWRAP WIDTH="+@Word(Width;div;2)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;2)+"</A></FONT></TD>]"; COLUMN3:="[<TD NOWRAP WIDTH="+@Word(Width;div;3)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;3)+"</A></FONT></TD>]"; COLUMN4:="[<TD NOWRAP WIDTH="+@Word(Width;div;4)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;4)+"</A></FONT></TD>]"; COLUMN5:="[<TD NOWRAP WIDTH="+@Word(Width;div;5)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;5)+"</A></FONT></TD>]"; COLUMN6:="[<TD NOWRAP WIDTH="+@Word(Width;div;6)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;6)+"</A></FONT></TD>]"; COLUMN7:="[<TD NOWRAP WIDTH="+@Word(Width;div;7)+"><FONT SIZE=2 FACE="Verdana"><A
HREF=""+DB+"0/"+@Text(@DocumentUniqueID)+"?OpenDocument"+"">"+@Word(Value;div;7)+"</A></FONT></TD>]"; Column1+Column2+Column3+Column4+Column5+Column6+Column7
This was first published in May 2002