Determine if a Gridview column is readonly programatically

A

Angel

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
 
P

Phil H

Angel said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top