How to rename DataGridView Header by double click
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: How to rename DataGridView Header by double click

  1. #1
    Join Date
    Nov 2011
    Posts
    8

    Unhappy How to rename DataGridView Header by double click

    I am having a datagrid view. In that suppose I give the header name as wrong, suppose say, instead of "test", i gave it as "tst". So i need to rename in this case. So what i expect is I need to double click that header and rename it. But in code I can't directly give it as "test", since it can be whatever. By double clicking i need to change in that display itself. I can able to catch the double click event. It is as below. Please suggest me a code which makes me to edit and rename the header.

    private void dgvParametersEdit_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
    {

    }

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,018

    Re: How to rename DataGridView Header by double click

    Quote Originally Posted by Rayner View Post
    ...
    private void dgvParametersEdit_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
    {

    }
    DataGridViewCellMouseEventArgs Class does NOT belong to native C++. It is a .Net class. So, you should ask your question in some of the .Net or Managed C++/CLI forum.
    Victor Nijegorodov

  3. #3
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,571

    Re: How to rename DataGridView Header by double click

    Quote Originally Posted by VictorN View Post
    [...] So, you should ask your question in some of the .Net or Managed C++/CLI forum.
    I'd even say it rather is C#. So, @OP, the correct forum section is this: http://www.codeguru.com/forum/forumdisplay.php?f=11
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center