Hi,
I tried to display some charts in a Grid like the attached picture, so I need to pass the data to the cell and I used following code:
Basing on the definition, the type of
So the
Is this a bug or anything wrong in my code?
Thanks
Charles
I tried to display some charts in a Grid like the attached picture, so I need to pass the data to the cell and I used following code:
Random r = new Random (); GridServer.Rows.Add ("1"); for (int i= 1; i <= 16; i++){ DataTable table = new DataTable (); table.Columns.Add ("DateTime", typeof (DateTime)); table.Columns.Add ("Value", typeof (double)); table.Rows.Add (DateTime.Now, r.Next (100)); table.Rows.Add (DateTime.Now.AddSeconds (30), r.Next (100)); table.Rows.Add (DateTime.Now.AddSeconds (60), r.Next (100)); table.Rows.Add (DateTime.Now.AddSeconds (90), r.Next (100)); table.Rows.Add (DateTime.Now.AddSeconds (120), r.Next (100)); table.Rows.Add (DateTime.Now.AddSeconds (150), r.Next (100)); GridServer.Rows[0].Cells[i].Value = table; }Basing on the definition, the type of
GridServer.Rows[0].Cells[i].Value is objectpublic class GridViewCellInfo : IEquatable<GridViewCellInfo> { // Summary: // Gets or sets the value. public object Value { get; set; } //}So the
GridServer.Rows[0].Cells[i].Value should get the reference of my DataTable, but the actually value of Value is a empty string.Is this a bug or anything wrong in my code?
Thanks
Charles
