VIDEO - FUNCOES PARA TABELAS
----------------------------------------------------------------------------------------------------------------------
Functions for managing the Table controls - http://doc.windev.com
----------------------------------------------------------------------------------------------------------------------
BuildBrowsingTable - http://doc.windev.com
----------------------------------------------------------------------------------------------------------------------
TableAdd - http://doc.windev.com
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
// Cria Tabela
BuildBrowsingTable(TABLE_manual,fornecedor,taWithAutoId)
----------------------------------------------------------------------------------------------------------------------
//Cria Tabela usando Qry - Queue
BuildBrowsingTable(TABLE_manual,QRY_tabela_fornecedor,taFillTable)
----------------------------------------------------------------------------------------------------------------------
//Cria Tabela usando SQLQuery Manual
//------------------------------------------------//
// Colocar essas variavel no Projeto Code //
// GLOBAL //
// gdsQry is data source //
// gsSQL is string //
//------------------------------------------------//
gsSQL = [
SELECT
fornecedor.id_fornecedor AS Id_Fornecedor,
fornecedor.nome_fantasia AS Razao_Social
FROM
fornecedor
WHERE
fornecedor.id_empresa = 1
and fornecedor.id_fornecedor<1814
]
IF HExecuteSQLQuery(gdsQry,hQueryDefault,gsSQL) THEN
BuildBrowsingTable(TABLE_manual,gdsQry,taFillTable)
HFreeQuery(gdsQry)
END
----------------------------------------------------------------------------------------------------------------------
//Ajuste Tabela
//TABLE_manual.COL_NoName1..BrushColor=DarkGreen
{ "TABLE_manual._COL1"}..Width=60
{ "TABLE_manual._COL1"}..Caption="Codigo"
{ "TABLE_manual._COL1"}..Color=DarkBlue
{ "TABLE_manual._COL2"}..Width=300
{ "TABLE_manual._COL2"}..Caption="Nome"
{ "TABLE_manual._COL2"}..BrushColor=DarkGreen
----------------------------------------------------------------------------------------------------------------------
//Acrescentar Linha Manual
IF EDT_codigo<>0 THEN
TableAdd(TABLE_manual,EDT_codigo+TAB+EDT_Nome)
EDT_codigo=0
EDT_Nome=""
END
SetFocus(EDT_codigo)
----------------------------------------------------------------------------------------------------------------------