각각 5 행 3 열로 구성된 GridListControl 창이 두 개 있고 각 셀 내에 하드 코드 된 값을 넣었지만 Random
및 Timer
을 사용하여 각 셀에서 동적으로 업데이트하려고합니다. 나는 Here:을 거치지 만 나의 개념은 정리하지 않았다.C#에서 GridListControl에서 임의로 셀 데이터를 생성하는 방법?
Random
과 Timer
을 내 코드와 통합하는 방법은 무엇입니까?
친절히 도움. 내 코드의
일부는 다음과 같습니다 :
namespace First_Form_Demo
{
public partial class Form1 : Form
{
List<Tuple<int, int, double>> list_Tuple_BuySideDepth = null;
List<Tuple<double, int, int>> list_Tuple_BuySideDepth1 = null;
public Form1()
{
InitializeComponent();
Init();
}
private void Init()
{
// For GridListControl1.
list_Tuple_BuySideDepth = new List<Tuple<int, int, double>>();
list_Tuple_BuySideDepth.Add(new Tuple<int, int, double>(3, 451, 67.0050));
list_Tuple_BuySideDepth.Add(new Tuple<int, int, double>(9, 655, 67.0025));
list_Tuple_BuySideDepth.Add(new Tuple<int, int, double>(17, 2045, 67.0000));
list_Tuple_BuySideDepth.Add(new Tuple<int, int, double>(22, 2080, 66.9875));
list_Tuple_BuySideDepth.Add(new Tuple<int, int, double>(23, 1564, 66.9950));
// For GridListControl2.
list_Tuple_BuySideDepth1 = new List<Tuple<double, int, int>>();
list_Tuple_BuySideDepth1.Add(new Tuple<double, int, int>(67.0075, 813, 10));
list_Tuple_BuySideDepth1.Add(new Tuple<double, int, int>(67.0100, 1255, 28));
list_Tuple_BuySideDepth1.Add(new Tuple<double, int, int>(67.0125, 715, 13));
list_Tuple_BuySideDepth1.Add(new Tuple<double, int, int>(67.0150, 1687, 19));
list_Tuple_BuySideDepth1.Add(new Tuple<double, int, int>(67.0175, 1612, 24));
}
}
private void Form1_Load(object sender, EventArgs e)
{
MaximizeBox = false;
MinimizeBox = false;
if (true)
{
gridListControl1.MultiColumn = true;
gridListControl1.ForeColor = Color.Red;
gridListControl1.DataSource = list_Tuple_BuySideDepth;
this.gridListControl1.Grid.HScrollBehavior = Syncfusion.Windows.Forms.Grid.GridScrollbarMode.Disabled;//GridScrollbarMode.Disabled;
gridListControl2.MultiColumn = true;
gridListControl2.ForeColor = Color.Red;
gridListControl2.DataSource = list_Tuple_BuySideDepth;
this.gridListControl2.Grid.HScrollBehavior = Syncfusion.Windows.Forms.Grid.GridScrollbarMode.Disabled;
}
}
하지만 오류가 재산이나'처럼 온다 인덱서 시스템.을 배정 할 수 없습니다 - 읽기 전용입니다. 어떻게 고칠 수 있습니까? –
안녕하세요, 당신의 방식대로했습니다. 감사합니다. 위의 동일한 프로그램에서'grid list control '에서 수직 스크롤바를 비활성화하는 방법에 대한 질문이 하나 더 있습니다. 좋습니다. –
이 링크를 확인하십시오 : https://www.syncfusion.com/kb/6659/how-to-hide-horizontal-scroll-bars-in-gridlistcontrol – Fruchtzwerg