Results 1 to 3 of 3

Thread: [RESOLVED] Hide or Disable action link in Views

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Location
    India, Kerala, Calicut
    Posts
    242

    Resolved [RESOLVED] Hide or Disable action link in Views

    Hi

    I have a view to search Users by their Usernames, and another page in which all UserList are showing.
    Here What i am trying to do is once the search button is clicked the results will be showing in the UserList page. But along with that its showing links for Edit and Delete as it is the Default page for UserList.
    Is that possible to hide the links of Edit and Delete in the UserList page when the results of search is showing and in all other cases the both link should be visible.
    Without creating one more page i wanted to do this...

    Pls help me out...

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Hide or Disable action link in Views

    You can just use a If statement. You can pass a Boolean from the action via the ViewBag to indicate whether to show those links or not and then simply put the code that writes those links inside an If block that tests that Boolean.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Location
    India, Kerala, Calicut
    Posts
    242

    Re: Hide or Disable action link in Views

    Thank u jmcilhinney
    It works

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