Label for datagridview

sandya_116
sandya_116 used Ask the Experts™
on
How do we add a Label for a datagridview. I just need something as a title and it needs to be on the datagridview. Please help. Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You can use the header row and set, for instance, the first cell as your title...

With this, also, you could make the column span more than one.  So, you could center it, etc., if needed.

Does this work for you?

Author

Commented:
I am sorry I did not get that.
Commented:
Microsoft didn't include the .captiontext property in the datagridview (see the link below)
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=312639&SiteID=1
so if you absolutely need to have a label embedded in the control, i guess you should write a usercontrol with both a label and a datagridview

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial