'宣言 Public Property Transposed As System.Boolean
public System.bool Transposed {get; set;}
エントリ数(行数)がプロパティ数(列数)より少ない場合のように、データを水平方向に表示すると便利なことがあります。
'宣言 Public Property Transposed As System.Boolean
public System.bool Transposed {get; set;}
他のプロパティで書式を設定したり挙動を変更することができます
var flexGrid = new C1.Win.FlexGrid.C1FlexGrid(); flexGrid.Transposed = true;
public void Initialize() { //オブジェクトを初期化します... C1FlexGrid c1FlexGrid1 = new C1.Win.FlexGrid.C1FlexGrid(); //データを挿入します... c1FlexGrid1.DataSource = Enumerable.Range(0, 100).Select(x => new Product()).ToList(); //転置します... c1FlexGrid1.Transposed = true; }
public class Product { static Random _rnd = new Random(); static string[] _names = "Macko|Surfair|Pocohey|Studeby".Split('|'); static string[] _lines = "Computers|Washers|Stoves|Cars".Split('|'); static string[] _colors = "Red|Green|Blue|White".Split('|'); public Product() { Name = _names[_rnd.Next() % _names.Length]; Line = _lines[_rnd.Next() % _lines.Length]; Color = _colors[_rnd.Next() % _colors.Length]; Price = 30 + _rnd.NextDouble() * 1000; Cost = 3 + _rnd.NextDouble() * 300; Discontinued = _rnd.NextDouble() < .2; Introduced = DateTime.Today.AddDays(_rnd.Next(-600, 0)); } public string Name { get; set; } public string Color { get; set; } public string Line { get; set; } public double Price { get; set; } public double Cost { get; set; } public DateTime Introduced { get; set; } public bool Discontinued { get; set; } }