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. Advertisements

  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. Advertisements

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:
    403
    Marina
    Jul 8, 2003
  2. Ken Stealth
    Replies:
    3
    Views:
    4,250
    MS News \(MS ILM\)
    Aug 24, 2003
  3. =?Utf-8?B?RGFubnkgTWlsbGVy?=

    determine ASP.NET worker process user context programatically?

    =?Utf-8?B?RGFubnkgTWlsbGVy?=, Sep 30, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    5,074
    Karl Seguin
    Oct 3, 2005
  4. Kbalz
    Replies:
    2
    Views:
    1,476
    Kbalz
    Oct 4, 2007
  5. Keith G Hicks
    Replies:
    3
    Views:
    968
    Keith G Hicks
    Feb 18, 2008
  6. EdwardH
    Replies:
    0
    Views:
    614
    EdwardH
    Oct 12, 2008
  7. Tim Pacl

    Determine PageLayout programatically

    Tim Pacl, Jul 8, 2003, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    348
    Yan-Hong Huang[MSFT]
    Jul 14, 2003
  8. Jonathan Hyatt
    Replies:
    1
    Views:
    2,915
    Jonathan Hyatt
    Jun 8, 2004
Loading...