473,395 Members | 1,458 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,395 software developers and data experts.

how to hide edit item template control in runtime

hi all!

Can any one please help me in solving my problem

my problem is ......

how to hide the edit item template control (visibility of the textbox control should be false) once we click on edit button
thanks all
komala
Aug 21 '07 #1
3 2293
nateraaaa
663 Expert 512MB
hi all!

Can any one please help me in solving my problem

my problem is ......

how to hide the edit item template control (visibility of the textbox control should be false) once we click on edit button
thanks all
komala
You will need to use the FindControl method to access the control. Try this

if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
TextBox txt = (TextBox)e.Item.FindControl("NameofYourTextBox");
txt.Visible = false;
}

Nathan
Aug 21 '07 #2
kenobewan
4,871 Expert 4TB
One way would be to place it in a panel and make that invisible in the click event. HTH.
Aug 21 '07 #3
You will need to use the FindControl method to access the control. Try this

if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
TextBox txt = (TextBox)e.Item.FindControl("NameofYourTextBox");
txt.Visible = false;
}

Nathan


Thanks sir actually iam really sorry to respond you thanks
Sep 20 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: dixie | last post by:
I have some code that adds new records into a table for each ID in a list box when a button on a form is clicked. This works fine. My problem now is that I wish to be able to edit all the records...
0
by: doronb | last post by:
hello my question is : i define dynamic columns to datagrid , 4 columns are databound and 1 columne is "edit template column" and only this col editable , i define function for update when...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
0
by: Adam Knight | last post by:
Hi all, I have two nested DataLists. When I click edit in the parent list the edit comand executes and the required Edit Item Template is displayed. The child list is display in the...
5
by: MasterChief | last post by:
I am using Visual Web Developer to create a basic database app. I put in a grid view and Enabled Selecting on the gridview. What I would like to happen though is when the person clicks select it...
1
by: Abhishek | last post by:
I am creating a Datagrid at runtime and I have to create all the columns of grid at runtime... I am facing problem in the item template column. Here I want to place more than one control... For...
1
by: rogerford | last post by:
I have a grid which i bind with values from Database. I have events to edit and update the grid. I am not using SqlDatasource to connect to DB. Rather i am doing the updating of the grid...
1
by: chromis | last post by:
Hi, I'm having trouble fully implementing the edit section of a contact admin system, so far I have written the following: - Bean (Contact.cfc) - Data Access object (ContactDAO.cfc) - Gateway...
4
by: pel | last post by:
hi, can someone refer me to a web site, book, or other resource for learning how to edit templates? I'm following a book on asp.net 2.0. I'm using vsts 2005 team edition. it indicates I...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.