我正在使用ObjectListView
來顯示項目列表。但是,當我點擊列標題時,列沒有被排序。如何在ObjectListView中對項目進行排序?
請參考下面的代碼粘貼:
public class Stock
{
public Stock()
{
}
public Stock(string name, double lastPrice, double greenTrend, double redTrend, double lastGreenValue, double lastRedValue)
{
this.Name = name;
this.LastPrice = lastPrice;
this.GreenTrend = greenTrend;
this.RedTrend = redTrend;
this.LastGreenValue = lastGreenValue;
this.LastRedValue = lastRedValue;
}
public string Name
{
get { return name; }
set { name = value; }
}
private string name;
public double LastPrice
{
get { return lastPrice; }
set { lastPrice = value; }
}
private double lastPrice;
public double GreenTrend
{
get { return greenTrend; }
set { greenTrend = value; }
}
private double greenTrend;
public double RedTrend
{
get { return redTrend; }
set { redTrend = value; }
}
private double redTrend;
public double LastGreenValue
{
get { return lastGreenValue; }
set { lastGreenValue = value; }
}
private double lastGreenValue;
public double LastRedValue
{
get { return lastRedValue; }
set { lastRedValue = value; }
}
private double lastRedValue;
}
不可能想出解決辦法要麼, 謝謝! – Jeff
謝謝!爲什麼這不是我不知道的默認選項! –