TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arthi Dev
NA
3
2.3k
Making some column editable and some column noneditable using the asp:datagrid
Apr 29 2012 9:54 PM
Hi,
In my datagrid i have 9 columns. In that 4 column should be noneditable. If i use the readonly property in the design mode. Always the column in noneditable. But for me when i click on the checkbox, if it is true then that particular 4 column should be noneditable . If the checkbox is false, all the 9 column should be editable. For me all the column editable is working fine. But i have problem with the column nonediting.
In the design page i wrote as:
<
asp
:
TemplateColumn
HeaderText
="IPAddress">
<
ItemTemplate
>
<
asp
:
TextBox
ID
="txtaddress"
runat
="server"
Text
='
<%# DataBinder.Eval(Container, "DataItem.Ipaddress") %>
'
Enabled
="false"
/>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp
:
TextBox
ID
="txtaddress"
runat
="server"
Text
='
<%# DataBinder.Eval(Container, "DataItem.Ipaddress") %>
'/>
</
EditItemTemplate
>
</
asp
:
TemplateColumn
>
In the edit command i wrote as below
((TextBox)e.Item.FindControl("txtaddress")).ReadOnly = true;
Please help me with this question.
Reply
Answers (
4
)
[SOLVED]How do I make Configurable Key Down Events ???
How to do as following?