on 02-28-2009 1:41 PM
Is there any way to tell the iGrid, that it should show columns containing DB NULL simply blank (e.g. one SPACE or anything else which is unvisible)? Actually NULL values are shown as "NA" for numbers resp. "---" for strings, which is rather annoying.
Hi Bodo,
Use this code to replace NULL values like "NA" or "---" with SPACE -
for (i=0; i<=objGrid.getGridObject().getRowCount(); i++)
{
for (j=0; j<=objGrid.getGridObject().getColumnCount(); j++)
{
if (objGrid.getGridObject().getCellValue(i, j) == "" ||
objGrid.getGridObject().getCellValue(i, j) == "---" ||
objGrid.getGridObject().getCellValue(i, j) == "NA")
{
objGrid.getGridObject().setCellValue(i, j, " ");
}
}
}
Another way is if you are using a stylesheet then you can modify the stylesheet to handle NULL.
Regards,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The handling of nulls different than blanks is expected behavior, so I wouldn't get overly 'annoyed' by it.
What is the source of your query template - SQL? If so then I recommend the CASE statement where you can turn your null values into blanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.