发现datagrid中的数据超过一屏时
datagrid里不能自动出现滚动条
这是为什么?
datagrid里不能自动出现滚动条
这是为什么?
解决方案 »
- GridControl控件怎么把gridView的前1列锁定,就是拖动横向滚动条时,第一列始终是不会隐藏的
- datagridview导入excel数据问题,对应字段
- C#如何调用Surfer automation
- c#中List问题(在线等待)
- 挑战性的问题
- 求助:循环从Service取数据生成TreeView个各级Nodes
- [简单]string类的对象最多能容纳多少字节?
- 在WinForm下怎样解决多个控件绑定同一数据源的问题(急)
- 关于byte长度的若干问题,解答后马上结贴!
- 关天C#中的编码问题,请大家帮助!!
- 初学者的一个关于 crystal 和 dataset 问提。。。在线等待
- C#怎么可以让图片作为按钮
{
public MyDataGrid()
{
//make scrollbar visible & hook up handler
this.VertScrollBar.Visible = true;
this.VertScrollBar.VisibleChanged += new EventHandler(ShowScrollBars);
}
private int CAPTIONHEIGHT = 21;
private int BORDERWIDTH = 2;
private void ShowScrollBars(object sender, EventArgs e)
{
if(!this.VertScrollBar.Visible)
{
int width = this.VertScrollBar.Width;
this.VertScrollBar.Location = new Point(this.ClientRectangle.Width - width - BORDERWIDTH, CAPTIONHEIGHT);
this.VertScrollBar.Size = new Size(width, this.ClientRectangle.Height - CAPTIONHEIGHT - BORDERWIDTH);
this.VertScrollBar.Show();
}
}
}
要这么麻烦?这应该是一个很简单的问题!
datagrid没有相关的属性么?
this.dataGrid1.MouseWheel+=new MouseEventHandler(dataGrid1_MouseWheel);
private void dataGrid1_MouseWheel(object sender, MouseEventArgs e)
{
this.dataGrid1.Select();
}
如果点击数据单元格区好像不能滚动
主要 是我用了一下布局dock里面的fill datagrid就会填满整个窗口 这样的话那个scrollbar就显示不出来了但应该怎么解决呢》?