Geeky Storytelling - Mimickin' Excel Comments in the DataGridView
"I had a need to make the WinForm DataGridView bend to my will by having some Excel-like behavior. Since I had do do some digging to make this happen, thought I'd share.
First off, my goal was to include those little comment indicator triangles in specific cells. In order to do this, you need to handle the the CellPainting event. And no - before you ask - I haven't yet created my own grid control to inherit and extend the grid behavior...but it is on my list of refactoring tasks to consider.
Here is the CellPainting event handler (for simplicity, I'm always showing the little glyph. In reality, I selectively show it based on the data for the row):
..."
I just thought of a cool usage for this this weekend, so I wanted to make sure I blogged about it before I forgot it.
Unfortunately I've already forgotten it... sigh... stupid old brain. I need a brain v2 upgrade.
Anyway, I can at least blog about the inspiration for the idea. The above post shows how you can add an Excel like comment indicator to a DataGridView cell.
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...