private void FrmLotterycs_Load(object sender, EventArgs e)
{
t = 0;
UserJuanquanTB = O.get_UserJuanquan(empName);
if (UserJuanquanTB.Rows.Count > 0)
{
gridControl1.Height = UserJuanquanTB.Rows.Count * 26+26;
vScrollBar1.Minimum = -51;
vScrollBar1.Maximum = gridControl1.Height - panel1.Height;
gridControl1.DataSource = UserJuanquanTB;
}
}
private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
{
///gridControl1的顶部等于vScrollBar1的值
vScrollBar1.Minimum = 20;
vScrollBar1.Maximum = gridControl1.Height - panel1.Height;
gridControl1.Top = -vScrollBar1.Value;
}