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 April 20th, 2006, 09:00 AM
Authorized User
 
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default disable the checkbox in edit mode of datagrid

hi all,

I am using template columns to display data in datagrid. I am using checkbox in edit item template. At runtime when I click edit I want to disable some of the checkboxes depending upon the cell value.

How can I acheive this? Please help its urgent!!!

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

Use the EditCommand event. Grab the value you want to compare, then grab a reference to the checkbox and disable as needed
 
Old April 21st, 2006, 12:21 AM
Authorized User
 
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. but I have already tried all possible ways. Actully in edit command we can read cell values but we cannot get access to controls in EditItemTemplate. we can only get access to those control in update command.
I am using template columns Itemtemplate is Lable and EditItemTemplate is checkbox. If I access checkbox in Edit command. It gives error as

Object reference not set to instance of an object.

 
Old May 10th, 2007, 07:35 AM
Authorized User
 
Join Date: May 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I'm also facing the same kind of problem can u put ur code then i can do cross-verification.



With Regards,
Muralidharan.D





Similar Threads
Thread Thread Starter Forum Replies Last Post
enable/disable checkbox in data grid on edit maddy137 ASP.NET 1.0 and 1.1 Professional 3 January 8th, 2007 01:28 AM
disable the checkbox in edit mode of datagrid swati_joshi ASP.NET 1.0 and 1.1 Basics 1 April 20th, 2006 01:44 PM
Datagrid - edit mode Programator ASP.NET 1.0 and 1.1 Professional 1 September 5th, 2003 08:38 AM
Datagrid - edit mode Programator ASP.NET 1.x and 2.0 Application Design 1 September 5th, 2003 08:37 AM
Datagrid - edit mode Programator Classic ASP Professional 0 September 5th, 2003 03:13 AM





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