|
Subject:
|
Disabling/enabling the textbox of EditCommandColu
|
|
Posted By:
|
ninel
|
Post Date:
|
2/20/2006 11:57:47 AM
|
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
|
|
Reply By:
|
jbenson001
|
Reply Date:
|
2/20/2006 3:39:34 PM
|
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
|