Results 1 to 5 of 5

Thread: [RESOLVED] Data Grid View read only

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2020
    Location
    Brisbane, Oz
    Posts
    10

    Resolved [RESOLVED] Data Grid View read only

    Is it possible to make a DGV control read only, i.e. End user can't change details or add new items, but still enable it to be updated via code

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

    Re: Data Grid View read only

    This is a perfect example of why you should ALWAYS read the documentation first. If you'd done that, you'd have seen that the DataGridView class has a ReadOnly property. You could have seen that property with a quick look in the Properties window too. It's purpose seems fairly self-explanatory but, if you need more, you can always read about it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2020
    Location
    Brisbane, Oz
    Posts
    10

    Re: Data Grid View read only

    Quote Originally Posted by jmcilhinney View Post
    This is a perfect example of why you should ALWAYS read the documentation first. If you'd done that, you'd have seen that the DataGridView class has a ReadOnly property. You could have seen that property with a quick look in the Properties window too. It's purpose seems fairly self-explanatory but, if you need more, you can always read about it.
    Thanks for the answer, works exactly as required.

    Sorry don't have hours and hours to read manuals, look at every possible property, or count the number of angels on the tip of a pin, this is secondary stuff to my main heavy duty programming.

    RTFM, why then would we possibly need this forum as the manual and stackoverflow would suffice for requirements?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Data Grid View read only

    Quote Originally Posted by Salient View Post
    Sorry don't have hours and hours to read manuals, look at every possible property, or count the number of angels on the tip of a pin
    That's a ridiculously gross exaggeration, which you're making to justify your lack of effort. If you can pretend that it was really hard then it's OK not to have done it. The problem is that it would have taken you minutes at the most to find the property in the Properties window. You may not have hours and hours to read the manuals but, fortunately, that would never be a requirement. Lucky you.
    Quote Originally Posted by Salient View Post
    RTFM, why then would we possibly need this forum as the manual and stackoverflow would suffice for requirements?
    Sites like this and, in fact, Stack Overflow are for the hard stuff that you can't work out on your own, not for the easy stuff that you can't be bothered to work out on your own. If all you need is this site then what is the manual for? Oh, that's right, it's people who actually do read the manual, or at least glance at the Properties window, who answer the questions.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Data Grid View read only

    Quote Originally Posted by Salient View Post
    Sorry don't have hours and hours to read manuals, look at every possible property, or count the number of angels on the tip of a pin
    That's a ridiculously gross exaggeration, which you're making to justify your lack of effort. If you can pretend that it was really hard then it's OK not to have done it. The problem is that it would have taken you minutes at the most to find the property in the Properties window. You may not have hours and hours to read the manuals but, fortunately, that would never be a requirement. Lucky you.
    Quote Originally Posted by Salient View Post
    RTFM, why then would we possibly need this forum as the manual and stackoverflow would suffice for requirements?
    Sites like this and, in fact, Stack Overflow are for the hard stuff that you can't work out on your own, not for the easy stuff that you can't be bothered to work out on your own. If all you need is this site then what is the manual for? Oh, that's right, it's people who actually do read the manual, or at least glance at the Properties window, who answer the questions. Apart from that, it's not even manual as such. The Microsoft Docs site is searchable and hyperlinked and you can go straight to a specific topic from VS with the F1 key. It's use takes little effort, but even that is still some effort.

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