.NET Discussion

.NET Issues, Problems, Code Samples, and Fixes

DataGridViewButtonColumn.Text Not Showing Up


I’m having a bit of trouble getting the button to show text.  I’ve read a few articles (1 | 2) about how to do this, but still, it will not show up.  I’ve set the UseColumnTextForButtonValue to True and put text in the Text property (as well as the HeaderText and ToolTipText) and run the program, but to no avail.  Anyone got anything for me?

 Status: 7/18/07 – Workaround discovered, still looking for “ideal” solution
Solution: Workaround
Since every type of DataGridView[whatever]Column is essentially the same, only differing by appearance, just use a different one and put some text in there, and then handle the Click event.  For instance, if you wanted, you could create a button image with the text you want on it and use an image column.  It’s not ideal, but it works! 

Advertisements

July 6, 2007 - Posted by | DataGridView

7 Comments »

  1. I also have the same problem.

    Regards,
    Komail Noori
    Web Site DesignSEO Expert

    Comment by Web Site Design | August 21, 2007 | Reply

  2. To display the same button text for every cell, set the UseColumnTextForButtonValue property to true and set the Text property to the desired button text.

    Regards,
    Komail Noori
    Web Site DesignSEO Expert

    Comment by Web Site Design | August 21, 2007 | Reply

  3. Yeah, thanks for the tip, but unfortunately, I tried that. No dice!

    Comment by Some.Net(Guy) | August 30, 2007 | Reply

  4. i m tried but didn’t get now i mget thank you very much
    thanks Komail Noori

    Comment by Ranganathan | September 28, 2007 | Reply

  5. Hi
    Set button flat style properties to standard

    Hope it helps

    Regards,
    Joel

    Comment by Jojo | October 4, 2007 | Reply

  6. Hi guys,

    Set FlatStyle property to “standard”

    Hope it helps

    Comment by Jojo | October 4, 2007 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: