1 Attachment(s)
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?
thanks in advance,
Wael
Re: how to hide delete link based on dropdown list selection?
The DataGridView has a CellValueChanged event. Are you using VB 2005?
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.
Re: how to hide delete link based on dropdown list selection?
Quote:
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?
thanks ,
Waely