On Item Click Event?

3 posts, 0 answers
  1. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 09 Dec 2008 Link to this post

    I have created the following code to make three radgrids visible and invisible by clicking three options on radToolBar...
    I have called the following function on toolBarItemClicked event, but only the first radgrid is working accordingly while pthers arent. Please help!

    function

    OnMainMenuItemClick(sender, args) // fine

     

    {

     

    var itemText = args.get_item();

     

     

    if(itemText.get_text() == "NoteBook")

     

    {

    $find(

    "<%= RadGrid_NoteBook.ClientID %>").get_element().style.display = "";

     

    $find(

    "<%= RadGrid_Networks.ClientID %>").get_element().style.display = "none";

     

    $find(

    "<%= RadGrid_Friends.ClientID %>").get_element().style.display = "none";

     

    }

     

    else if(itemText.get_text() == "Networks")

     

    {

    $find(

    "<%= RadGrid_NoteBook.ClientID %>").get_element().style.display = "none";

     

    $find(

    "<%= RadGrid_Friends.ClientID %>").get_element().style.display = "none";

     

    $find(

    "<%= RadGrid_Networks.ClientID %>").get_element().style.display = "";

     

    }

     

    else if(itemText.get_text() == "Friends")

     

    {

    $find(

    "<%= RadGrid_NoteBook.ClientID %>").get_element().style.display = "none";

     

    $find(

    "<%= RadGrid_Networks.ClientID %>").get_element().style.display = "none";

     

    $find(

    "<%= RadGrid_Friends.ClientID %>").get_element().style.display = "";

     

    }

    }

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 09 Dec 2008 Link to this post

    Hi saadi,

    Does the code get executed at all? You can test by putting alert messages in the if statements:

    if(itemText.get_text() == "NoteBook")
    {
         alert("NoteBook");
         ....
    }

    Sincerely yours,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 09 Dec 2008 Link to this post

    LISTENNNNN...........
    Its again not working!!! Is there any problem of applying javascript that is no reliablilty with radcontrols...???
    I have become fed up of applying javascripts with almost every control of telerik but all are not working.....WHY???
Back to Top