Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Disabling/enabling the textbox of EditCommandColumn based on value

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
[520 byte] By [ninel] at [2007-11-11 8:03:19]