Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2006, 12:57 PM
Authorized User
 
Join Date: Mar 2005
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disabling/enabling the textbox of EditCommandColu

I have a datagrid on my web form. The datagrid displays an employee's name, their Login time and Logout time. I allow users to edit the Logout columns by using the EditCommandColumn control.

My question is...I have an id returned by a stored procedure that populates the datagrid. If the id returned is "1" I want the Login time to also be editable, but if the id is "2" the Logout time should not be editable.

Is there a way I can do this?
Any help would be greatly appreciated,
Ninel


 
Old February 20th, 2006, 04:39 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Use the ItemDataBound event of the grid. In it, grab the returned value, and a refecnce to the textbox control in the column. Then set the evabled property as needed.

Jim






Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling/Disabling Form Controls lbyii Javascript 6 October 13th, 2006 07:36 AM
Enabling and disabling Required field Validators mrufus General .NET 0 June 27th, 2006 03:44 AM
Enabling and Disabling form elements socoolbrewster Javascript How-To 4 February 21st, 2006 04:45 PM
MS-Outlook, enabling/disabling rules shamigc VBScript 0 August 4th, 2004 08:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.