Instead of using DBNull, just use "null":
if (Convert.ToString(row["MPT11"]) == "-777") {row["MPT11"] = "null";}
That way, your code will be consistent, and you won't run afoul of any
browsers that mishandle empty slots in an array.
On Tuesday, March 5, 2013 1:56:01 PM UTC-5, Matevz Uros Pavlic wrote:
>
> Hi,
>
> nice to know that ;)
>
> I managed to change the last column like this :
>
> String lastCol = Convert.ToString(row["MPT32"]);
>
> if (Convert.ToString(row["MPT11"]) == "-777")
> {row["MPT11"] = DBNull.Value;}
> if (Convert.ToString(row["MPT12"]) == "-777")
> {row["MPT12"] = DBNull.Value;}
> if (Convert.ToString(row["MPT2"]) == "-777")
> {row["MPT2"] = DBNull.Value;}
> if (Convert.ToString(row["MPT31"]) == "-777")
> {row["MPT31"] = DBNull.Value;}
> if (lastCol == "-777") {lastCol = "null";}
>
> rowsList.Add("[new Date(" + yourDate.Year + ", " +
> (yourDate.Month - 1) + ", " + yourDate.Day + ", " + yourDate.Hour + ", " +
> yourDate.Minute + ", " + yourDate.Second + "), "
> + row["MPT11"] + ", "
> + row["MPT12"] + ", "
> + row["MPT2"] + ", "
> + row["MPT31"] + ", "
> + lastCol + "]");
>
>
> And it's finally working.
>
>
> Still having troubles to hack it on server thought...Decimal points vs. Comma.
>
> Thanks for the help!
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.