how to hide delete link based on dropdown list selection?[Unresolved]
hi,
I have a datagrid as the attached image shows. I want to be able to hide the Del link for that particular record if some value is selected from the activity dropdown list. can someone help please?
Re: how to hide delete link based on dropdown list selection?
You could probably do the Del as a template column and as a control instead of a Command Field, and then when you databind add an event handler so on the change event for the pulldown, the Del's .visible value is set to false.
Sean
Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.
Re: how to hide delete link based on dropdown list selection?
Originally Posted by SeanGrebey
You could probably do the Del as a template column and as a control instead of a Command Field, and then when you databind add an event handler so on the change event for the pulldown, the Del's .visible value is set to false.
aspnot - I'm using 2003
SeanGrebey -
I converted the command fileds to template columns but not sure how or where to add the event handler since I have also to hid the Del command when the page loads in the first time IF the value of the dropdown is that value. so I have to check for the value the first time the page loads and on OnSelectedIndexChanged right?