如何设置winform的datagrid的rowhead(行头)显示的文字 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void dataGrid1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { int row = TopRow(); int yDelta = dataGrid1.GetCellBounds(row, 0).Height + 1; int y = dataGrid1.GetCellBounds(row, 0).Top + 2; CurrencyManager cm = (CurrencyManager) this.BindingContext[dataGrid1.DataSource, dataGrid1.DataMember]; while(y < dataGrid1.Height - yDelta && row < cm.Count) { //get & draw the header text... string text = string.Format("row{0}", row); e.Graphics.DrawString(text, dataGrid1.Font, new SolidBrush(Color.Black), 12, y); y += yDelta; row++; } } 自右向左滚动消息。。。 求助:为何预览有内容,打印出来却是空白页 SQL问题 关于DevExpress 的GridControl控件定位 方法里怎样传FileUpload对象 密码框在后台赋值和回传后状态问题 ???大量网址做测试 哪位老大有C#的禁用网卡和启用网卡的程序?100相送。 两个DataSet结构相同,把一个中的数据导入到另一个,除了一条条的添加外还有没有别的方法!? 学习c#有什么捷径吗? 有<<数据结构与算法>>C#版 的书吗? 极度郁闷!发两个招聘的帖子,扣了10信誉分。
{
int row = TopRow();
int yDelta = dataGrid1.GetCellBounds(row, 0).Height + 1;
int y = dataGrid1.GetCellBounds(row, 0).Top + 2;
CurrencyManager cm = (CurrencyManager) this.BindingContext[dataGrid1.DataSource, dataGrid1.DataMember];
while(y < dataGrid1.Height - yDelta && row < cm.Count)
{
//get & draw the header text...
string text = string.Format("row{0}", row);
e.Graphics.DrawString(text, dataGrid1.Font, new SolidBrush(Color.Black), 12, y);
y += yDelta;
row++;
}
}