Change the layout of controls at runtime?

R

refresh

Hi there!
I have a datagrid with some textbox controls on it. First, i set those
textboxes readonly. I want when the user click on a specific button,
those textboxes became editable.
I try

((TextBox)myGrid.Items[e.Item.ItemIndex].FindControl("txtName")).ReadOnly
= false;

but it's not work.
Can you help me solve that??? Thank you!
P/S: I'm new to ASP.NET
 
R

Rad [Visual C# MVP]

What event are you putting this code in?

Hi there!
I have a datagrid with some textbox controls on it. First, i set those
textboxes readonly. I want when the user click on a specific button,
those textboxes became editable.
I try

((TextBox)myGrid.Items[e.Item.ItemIndex].FindControl("txtName")).ReadOnly
= false;

but it's not work.
Can you help me solve that??? Thank you!
P/S: I'm new to ASP.NET
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top