I agree is the way to go Kind Regards Ian Claxton
K
King_kLAx
@King_kLAx
Posts
-
Display the Page.User.Identity.Name in the datagrid hyperlink column -
How to show file size in kb in dataGridUse a code behind method like this one - protected string FormatBytes(double bytes) { double gigabyte = 1024 * 1024 * 1024; double megabyte = 1024 * 1024; double kilobyte = 1024; if (bytes > gigabyte) { return string.Format("{0:#,###,###.00} GB", (bytes / gigabyte)); } else if (bytes > megabyte) { return string.Format("{0:#,###.00} MB", (bytes / megabyte)); } else if (bytes > kilobyte) { return string.Format("{0:#,###.00} KB", (bytes / kilobyte)); } else { return string.Format("{0:#,###} B", bytes); } } Then on your column item template use somthing like this - This should do the trick! Kind Regards Ian Claxton C# is for life not just for christmas