From: saravanan_article on
Hi Team,

This is saravanan i am new to C#.. I am using VS2005 for my windows
based application.. I am using DataGridView to show the values.. What i
want is i want to display the text in the rowheaders of the
DataGridview and I want to enable the tooltip in the cells.

Thanks in advance

Any help or suggesstion is appreciated

From: scott blood on
Hello,

I dont think your suppose to be able to change the RowHeader text in a
windows form, its quite simple in asp.net but in a windows form it can be a
pain in the behind.

However you could trying the following code.

private void MyDataGridView_RowPostPaint(object sender,
DataGridViewRowPostPaintEventArgs e)
{
// The using statement automatically disposes the brush.
using (SolidBrush b = new
SolidBrush(MyDataGridView.RowHeadersDefaultCellStyle.ForeColor))
{
e.Graphics.DrawString(e.RowIndex.ToString(),
e.InheritedRowStyle.Font, b, e.RowBounds.Location.X + 20,
e.RowBounds.Location.Y + 4);
}
}

Hope this helps in some way
Regards
Scott Blood
C# Developer

<saravanan_article(a)yahoo.com> wrote in message
news:1142392730.708694.217350(a)e56g2000cwe.googlegroups.com...
> Hi Team,
>
> This is saravanan i am new to C#.. I am using VS2005 for my windows
> based application.. I am using DataGridView to show the values.. What i
> want is i want to display the text in the rowheaders of the
> DataGridview and I want to enable the tooltip in the cells.
>
> Thanks in advance
>
> Any help or suggesstion is appreciated
>