ret = ret & "</table>" & vblf
totable = ret
end function
private function bind(row, col)
dim format, find, replacement, index, myvartype
dim openb, closeb
format = m_columns(col)
openb = instr(format, "{")
dim var
if openb < 0 then
bind = format
else
closeb = instr(format, "}")
var = mid(format, openb + 1,closeb - openb - 1)
openb = instr(var, "[")
closeb = instr(var, "]")
myvartype = mid(var, 1, openb - 1)
'response.write(myvartype)
index = cint(mid(var, openb+1, closeb - openb -1))
'response.write(index)
find = "{" & myvartype & "[" & index & "]}"
if "html" = myvartype then
replacement = m_datasource(row)(index)
elseif "text" = myvartype then
replacement = server.htmlencode(m_datasource(row)(index))
end if
bind = replace(format, find, replacement)
end if
end function
'显示表头
'@param 表头数组
'@return 表头html源码
private function thead()
dim ret, i
ret = ""
for i = 0 to ubound(m_headertexts)
ret = ret & "<th " & m_thattribute
if isarray(m_columnwidths) then
ret = ret & " width=""" & m_columnwidths(i) & """"
end if
if isarray(m_headertextaligns) then
ret = ret & " align=""" & m_headertextaligns(i) & """"
end if
ret = ret & ">" & m_headertexts(i) & "</th>" & vblf
next
thead = ret
end function
private function tfoot()
end function
end class