473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Change the layout of controls at runtime?

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

Nov 16 '06 #1
1 1102
What event are you putting this code in?

On 15 Nov 2006 18:27:52 -0800, "refresh" <ph*********@gmail.com>
wrote:
>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
--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ralph Soons | last post by:
Hi all, I am looking for a correct way to setup my website layout. For instance: I would like to have a selection mechanism (like tree or something) on the left and the page data on the right. ...
2
by: Leo | last post by:
I would like to set my customized control's layout to be the layout of the page in ASP.NET. Is there any way to get the width and height of the page thus I can set my control's width and height to...
1
by: Lacka | last post by:
Hi, Is it possible, to change the keyboard layout on an asp.net page? I have two textboxes: one for the greek text, and one for the hungarian. If the greek gets the focus, it would be nice to...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
5
by: Mahesh Devjibhai Dhola [MVP] | last post by:
Hi, How to achieve effect of LayoutManagers like java has Grid, Flow, Border etc layouts in .Net? The case is: I am creating the form runtime and adding controls on run-time so at that time its...
3
by: jonefer | last post by:
I tried all sorts of key combinations. How do I precisely move controls, such as labels or textboxes with the arrow keys? I notice that new labels or boxes only have 2 handles on them, -...
1
by: Anoop | last post by:
Hi, Requirement: Create Edit Forms dynamically i.e. at runtime in C#.net. The child contol(s) information e.g. no.of control, their type(lable/textbox), enabled/disabled etc. is coming from the...
2
JimWu
by: JimWu | last post by:
Do anyone know how to layout in Panel control. The code as follows labels.Text = "Album Name :"; labels.Text = "Title :"; labels.Text = "Tag :"; labels.Text = "Description :";
3
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.