Change the layout of controls at runtime?

  • Thread starter Thread starter refresh
  • Start date Start date
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
 
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
 
Back
Top