3.0.0

GRID-Fields with null value

hello
I have a problem with Grid control. For fields with NULL value, aw skips the cell, resulting in data shifting to the left, and I need that this fields appear in to the grid
How can I convert this null-fields in not-null-field,

var DGridDatos = new AW.UI.Grid;
DGridDatos.setId("DGridDatos");

var tablaDatos = new AW.XML.Table;
tablaDatos.setURL("webservice.asmx/construyeDataSetGenerico");

var ssql="...."; //here is the SELECT sentence

tablaDatos.setParameter("Consulta", ssql);
tablaDatos.setParameter("Conexion", Conexion);
tablaDatos.setParameter("NombreTabla", "Datos");
tablaDatos.setRequestMethod("POST");
tablaDatos.setRows("//NewDataSet/*");
tablaDatos.request();


DGridDatos.setCellModel(tablaDatos);
DGridDatos.setColumnCount(9);
DGridDatos.setHeaderText(["Código","Proyecto","Nom.Cliente","V.Sol","Fecha","Status","Prioridad","Tipo","Responsable"]);
DGridDatos.setColumnIndices([0,1,2,3,4,5,6,7,8]);
DGridDatos.setCellTemplate(new AW.Templates.Checkbox, 0);
TECNORA
April 14,
The best approach would be to change your SQL select statement to convert null values to blanks (that is, "" or " ").

So, check your table definition(s) and, for every nullable field you select, put an isnull() (or equivalent depending on your SQL dialect) wrapper around it.
Anthony
April 14,
Alternative solution is to specify XPath for each column -

http://www.activewidgets.com/aw.xml.table/columns.html

There is also sample code in examples/grid data - xml data islands/xpath.htm
Alex (ActiveWidgets)
April 14,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.