Disable Edit (Buttons) in FormView and GridView in ASP.NET / VB.NET

Posted on 2007-07-26
Last Modified: 2012-06-27
How do I disable the Edit Button in a FormView and Gridview that is normally editable except when a certain column is set - All rows would become uneditable......
Question by:tlatacki
    LVL 8

    Accepted Solution

    Using FindControl get the control and set the property to disable.

    Author Comment

    How about an example.

    Author Comment


    Ok - I have it working for a FormView - But Can't figure out how to access in a GridView

    Author Comment


    Got my solution - Thanks for the direction

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video discusses moving either the default database or any database to a new volume.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now