Disable buttons on the Clientside

8 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 18 Oct 2010 Link to this post

    How can I disable the buttons clientside until an xmlhttpcallback has completed?

    ...I know how to do the callback :), the question is, does a clientside function exist to disable them?
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 21 Oct 2010 Link to this post

    Hi Steve,

    You can use the _disableButtons method provided by RadListBox. Here is short example:

    $find("RadListBox1")._disableButtons();

    Regards,
    Genady Sergeev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joaquín
    Joaquín avatar
    27 posts
    Member since:
    Jan 2012

    Posted 15 Feb 2012 Link to this post

    Is there any place in which I could find all client methods for listbox buttons?

    I have 2 list boxes. The 1st one contains several items and the 2nd one is empty. User can transfer only one item from the 1st to the 2nd (if he changed mind, he would have to transfer back the item in the 2nd listbox to be allowed to transfer a new one). To force this behaviour I change the active butttons in code behind, but that needs a postback every time. I would like to implement the same simple functionality using client code, but I cannot find the client api of list box.

    This is the code I'd like to implent using java:

    Protected Sub lstRadSouceLangSelected_Deleted(sender As Object, e As Telerik.Web.UI.RadListBoxEventArgs) Handles lstRadSouceLangSelected.Deleted
            lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferFrom
            lstRadSouceLangLista.AllowTransferOnDoubleClick = True
            lstRadSouceLangSelected.AllowTransferOnDoubleClick = False
        End Sub
     
     
        Protected Sub lstRadSouceLangSelected_Inserted(sender As Object, e As Telerik.Web.UI.RadListBoxEventArgs) Handles lstRadSouceLangSelected.Inserted
            lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferTo
            lstRadSouceLangLista.AllowTransferOnDoubleClick = False
            lstRadSouceLangSelected.AllowTransferOnDoubleClick = True
        End Sub
  5. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 15 Feb 2012 Link to this post

    Here you go good sir: http://www.telerik.com/help/aspnet-ajax/listbox-client-side-basics.html :)

    ...and there's also usually some undocumented functions in there too: LiNK
  6. Joaquín
    Joaquín avatar
    27 posts
    Member since:
    Jan 2012

    Posted 16 Feb 2012 Link to this post

    Thank you for yuor reply Steve. I had already checked your first link, but there is no reference there to managing the buttons on the client side. Your second link is great: now I know how to "discover" all those undocumented control functions.

    Unluckyly, using Firebug I haven't been able to find the equivalent client side function of the server method:

    RadListBox.ButtonSettings.TransferButtons = ListBoxTransferButtons.XYX

     

    Does someone know if it is ever possible?

  7. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 21 Feb 2012 Link to this post

    Hello Joaquin,

    It is not possible to set which are the transfer button on the client, because RadListBox utilizes server-side rendering only, i.e. the buttons must be rendered on the server.

    Greetings,
    Genady Sergeev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Joaquín
    Joaquín avatar
    27 posts
    Member since:
    Jan 2012

    Posted 22 Feb 2012 Link to this post

    Thank you for your answer Genady.

    Could you then explain me how to properly ajaxify both listboxes (transfer.from and transfer.to)?

    When the user transfer an item from one listbox to the other, the application performs a postback to set the visible buttons. I would like to ajaxify this to avoid the flicker. However, if I use regular ways to do it (update panel, ajax manager), it results in undesired behaviour of the page (perhaps an ajax bucle?).

    Thank you in advance,

    Joaquín
  9. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 27 Feb 2012 Link to this post

    Hi Joaquin,

    Could you please elaborate on the exact problem that you experience using the normal RadAjaxManager/UpdatePanel? By default the simplest way is to place the both listboxes in RadAjaxPanel. We are not aware of any problems with this scenario.

    Regards,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017