// String[] gridNames = {"Key", "Name","Disp. Credit","Credit used",
// "Contact", "Phone no.", "Zip", "City", "Income", "c_bpartner_id",
// "c_bpartner_contact_id", "c_bpartner_location_id", "rowkey"};
String[] colWidths = { "73", "86", "166", "62", "32", "145", "104", "67", "97", "167", "0" };
for (int i = 0; i < colNames.length; i++) {
SQLReturnObject dataAux = new SQLReturnObject();
dataAux.setData("columnname", colNames[i]);
dataAux.setData("gridcolumnname", colNames[i]);
dataAux.setData("adReferenceId", "AD_Reference_ID");
dataAux.setData("adReferenceValueId", "AD_ReferenceValue_ID");
dataAux.setData("isidentifier", (colNames[i].equals("rowkey") ? "true" : "false"));
dataAux.setData("iskey", (colNames[i].equals("rowkey") ? "true" : "false"));
dataAux.setData("isvisible",
(colNames[i].endsWith("_id") || colNames[i].equals("rowkey") ? "false" : "true"));
String name = Utility.messageBD(this, "PCS_" + colNames[i].toUpperCase(), vars.getLanguage());
dataAux.setData("name", (name.startsWith("PCS_") ? colNames[i] : name));
dataAux.setData("type", "string");
dataAux.setData("width", colWidths[i]);
dataAux.setData("issortable", colSortable[i] ? "true" : "false");
vAux.addElement(dataAux);
}
data = new SQLReturnObject[vAux.size()];
vAux.copyInto(data);
return data;