Results 1 to 12 of 12

Thread: [RESOLVED] DGV Column header

Hybrid View

  1. #1
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: [RESOLVED] DGV Column header

    True story: quoting and linking to the documentation is the professional move. Everything else was there to make JMC feel smarter than you.

    DGV is a complex control with literally hundreds of properties. You should take the time to read as many of the documentation pages as you can. It's not everyone's idea of fun. But 90% of what I learned in early VB was literally just reading random MSDN pages and trying the examples. You can't learn what's there if you don't look! The hard part is "Ugh I need to know how a feature works but I'm not sure it exists". The best way to make that easy is to read about as many features as possible, even the ones you don't need right now, so it becomes, "Ugh dang I remember this was a feature but I forget which dang properties it was."

    You really do need to devote the time to it, though. An entire book could be written JUST about this one control, it's huge.
    Last edited by Sitten Spynne; Dec 6th, 2017 at 08:39 PM.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] DGV Column header

    Quote Originally Posted by Sitten Spynne View Post
    True story: quoting and linking to the documentation is the professional move. Everything else was there to make JMC feel smarter than you.
    Teach a man to fish... etc. Slap him with the fish you caught while teaching him how to fish and you may not make a friend but it's not a lesson that will soon be forgotten. I'll say again, I find it rather amusing that I'm the one assuming that others are capable of doing as I do and yet I'm supposedly the one who thinks that I'm superior.
    Quote Originally Posted by Sitten Spynne View Post
    The hard part is "Ugh I need to know how a feature works but I'm not sure it exists".
    That can be the case at times but, if you're using a particular type or member in your own code, you know that type or member exists. Reading the documentation for that type or member is a pretty good place to start.
    Quote Originally Posted by gwboolean View Post
    All snide aside, I did indeed peruse the Help system and was unable to find the information that would provide the answer for this issue. Probably due to the fact that I had no prior knowledge of many of the capabilities residing in VB.
    As I said, you were using the ColumnHeadersDefaultCellStyle property in your code so that would have been a likely place to look. Maybe not the first, as you are using other properties too, but certainly A place to look.
    Quote Originally Posted by gwboolean View Post
    It is a crap shoot and I am sure that even professionals such as yourself are not always able to find the information that fits the situation you are in.
    To say that it's a crap shoot - or even a craps shoot - is significantly overstating the case. It obviously depends on what the actual problem is as to whether you can find the solution in the documentation. I certainly don't claim that you will always find what you need or understand everything you find. Clearly though, what you look for is a big factor in how often you will. Hopefully, whatever else is taken from this thread, you will have a better idea of how to use the Help effectively in future. If you've learned something and your already low opinion of me hasn't been tarnished then I call that a win.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: [RESOLVED] DGV Column header

    Quote Originally Posted by jmcilhinney View Post
    Teach a man to fish... etc. Slap him with the fish you caught while teaching him how to fish and you may not make a friend but it's not a lesson that will soon be forgotten. I'll say again, I find it rather amusing that I'm the one assuming that others are capable of doing as I do and yet I'm supposedly the one who thinks that I'm superior.

    That can be the case at times but, if you're using a particular type or member in your own code, you know that type or member exists. Reading the documentation for that type or member is a pretty good place to start.

    As I said, you were using the ColumnHeadersDefaultCellStyle property in your code so that would have been a likely place to look. Maybe not the first, as you are using other properties too, but certainly A place to look.

    To say that it's a crap shoot - or even a craps shoot - is significantly overstating the case. It obviously depends on what the actual problem is as to whether you can find the solution in the documentation. I certainly don't claim that you will always find what you need or understand everything you find. Clearly though, what you look for is a big factor in how often you will. Hopefully, whatever else is taken from this thread, you will have a better idea of how to use the Help effectively in future. If you've learned something and your already low opinion of me hasn't been tarnished then I call that a win.
    "Teaching a man to fish", in my book, involves some education about lures, fish behavior, and ultimately providing practical lessons about how to hold the rod, casting, reeling in, etc. I like my student/teacher relationship to be something friendly and rewarding.

    As constructively as I can put it, your style of teaching is, "Here's the book. I'm going to read it to you because clearly you're too lazy." Sometimes you provide the practical lessons. Other times you seem to leave it at "the book has illustrations and I showed it to you, jeez do something on your own for once." This is a "tough love" approach. In literature this usually ends with the student becoming the master via a fight to the death. Very rarely are the people who practice it portrayed as admirable.

    The best parts of your post are where, instead of reading the book to the student, you teach practical lessons. Shoot for this:
    You can read about this feature at [ <list of MSDN links> ], but here's the short version:

    If property A is set, it means property B won't be set. (See <source>.) So if you really need to use property B, you shouldn't set property A. There are many other related properties like that, consider spending an hour or two reading the articles I linked!
    That doesn't come off as patronizing, and still has an awful lot of "read the documentation" in it. You've made quite a few posts like this lately, and when people get upset over them I've been trying to scold them because you've got a volume of knowledge on TableAdapters and DataGridView that'd take me too long to acquire myself and I usually learn something from those answers.

    But when I have to wade through you writing a whole paragraph to say "I think you were too lazy to read the docs" I tend to skip it. It doesn't feel like there'll be anything useful in those posts. You're burying your best content underneath bile and trash.

    Be Mr. Miyagi. Not Ra's al Ghul. They were both teachers who produced excellent students. Only one of them was a respectable man.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

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
  •  



Click Here to Expand Forum to Full Width