473,400 Members | 2,145 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,400 software developers and data experts.

Can you dynamically change an attribute for an EditItemTemplate?

Hello,
Does anyone know if you can programattically change the attribute of an
EditItemTemplate's html element? My template contains a textbox that I would
like to set to read-only when the user is updating. But switch it back to
not read-only when the user is adding a new record.

I've seen one MSDN article where you can create classes that implemement the
ITemplate and then insert them into the grids column collection at run time.
Is this the best solution?

Thanks,
Phillip
Nov 19 '05 #1
2 1445
Yes... Goahead with MSDN solutions.

-jignesh
www.dotnetjini.com

"phillip" <ph*****@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.com...
Hello,
Does anyone know if you can programattically change the attribute of an
EditItemTemplate's html element? My template contains a textbox that I would like to set to read-only when the user is updating. But switch it back to
not read-only when the user is adding a new record.

I've seen one MSDN article where you can create classes that implemement the ITemplate and then insert them into the grids column collection at run time. Is this the best solution?

Thanks,
Phillip

Nov 19 '05 #2
Okay. Thanks.
Phillip

"Jignesh Desai" wrote:
Yes... Goahead with MSDN solutions.

-jignesh
www.dotnetjini.com

"phillip" <ph*****@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.com...
Hello,
Does anyone know if you can programattically change the attribute of an
EditItemTemplate's html element? My template contains a textbox that I

would
like to set to read-only when the user is updating. But switch it back to
not read-only when the user is adding a new record.

I've seen one MSDN article where you can create classes that implemement

the
ITemplate and then insert them into the grids column collection at run

time.
Is this the best solution?

Thanks,
Phillip


Nov 19 '05 #3

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

Similar topics

6
by: Thomas | last post by:
Hi, I'm having a problem with the dynamically created inputfields in Internet Explorer. The situation is the following: - I have a dynamically created table with a textbox in each Cell. - It...
2
by: Suma | last post by:
I have a problem with editable datagrid and was hoping if anyone could help me. Please help me if possible. I have an editable datagrid, whose column count I don’t know until runtime. I am...
5
by: Amelyan | last post by:
How can I get state of dynamically created controls (RadioButton, CheckBox, TextBox.Text) on post back when I click submit button? The only way I know is by traversing Response.Form enumberator;...
0
by: NH | last post by:
Hi, I have a datagrid with 2 template columns. One of the columns has a EditItemTemplate defined that is just a textbox say called edClass. When the user edits the row of the datagrid I want to...
4
by: Joe | last post by:
I have an xml file which looks similar to this: <data> Please enter the value: <dynamicControl id="myDC", type="Textbox", MaxLength="100"/> </data> I am trying to devise a way to have a web...
2
by: sck10 | last post by:
Hello, I am trying to programically make the following TemplateField ("MyTemplate") visible when the user clicks on the "Edit" Button using the PreRender handle event. My question is, how do...
4
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup,...
4
by: =?Utf-8?B?QWJoaQ==?= | last post by:
I am using Reflection to invoke methods dynamically. I have got a special requirement where I need to pass a value to method by setting the custom method attribute. As I cannot change the...
6
by: _Who | last post by:
I use the code below to change to a style sheet that has: body { ....
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.