Determine if a Gridview column is readonly programatically

Discussion in 'ASP .Net Web Controls' started by Angel, Oct 23, 2006.

  1. Angel

    Angel Guest

    How can I determine that a column on my gridview is set to readonly in my
    codebehind?

    In other words I like to find out if a column in my grid is not editable....

    thanks
    Angel, Oct 23, 2006
    #1
    1. Advertising

  2. Angel

    Phil H Guest

    Angel wrote:
    > How can I determine that a column on my gridview is set to readonly in my
    > codebehind?
    >
    > In other words I like to find out if a column in my grid is not editable....
    >
    > thanks


    Hi Angel,

    I'm intrigued. Of you can only set this at design time and can't do so
    at run time then how come you need to test for it?

    I've checked the .NET Framework class library reference and sure enough
    the read-only property of a column in a Gridview object (which is
    declared in Markup) isn't exposed by a DataControlField class member
    (the GridView.Columns property is a collection of the foregoing type of
    objects).

    I will happily stand corrected though.

    Phil Hall
    Phil H, Oct 23, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Pacl

    Determine PageLayout programatically

    Tim Pacl, Jul 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    328
    Marina
    Jul 8, 2003
  2. Kbalz
    Replies:
    2
    Views:
    1,334
    Kbalz
    Oct 4, 2007
  3. Keith G Hicks
    Replies:
    3
    Views:
    764
    Keith G Hicks
    Feb 18, 2008
  4. EdwardH
    Replies:
    0
    Views:
    508
    EdwardH
    Oct 12, 2008
  5. Jonathan Hyatt
    Replies:
    1
    Views:
    1,916
    Jonathan Hyatt
    Jun 8, 2004
Loading...

Share This Page