using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace IReaper.FileData{
public class DataGridViewDownloadSpeedCell : DataGridViewTextBoxCell
{
protected override object
GetFormattedValue(object value,
int rowIndex,
ref DataGridViewCellStyle cellStyle,
System.ComponentModel.TypeConverter valueTypeConverter,
System.ComponentModel.TypeConverter formattedValueTypeConverter,
DataGridViewDataErrorContexts context)
{
//get data
double speed = (double)value;
return speed.ToString("0.00 KB/s");
}
}
}
|