Results 1 to 4 of 4

Thread: how to hide delete link based on dropdown list selection?[Unresolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    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
    Attached Images Attached Images  
    Last edited by waely; Mar 13th, 2006 at 05:31 PM.

  2. #2
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: how to hide delete link based on dropdown list selection?

    The DataGridView has a CellValueChanged event. Are you using VB 2005?

  3. #3
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    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.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width