This is a migrated thread and some comments may be shown as answers.

Disable buttons on the Clientside

7 Answers 49 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 2
Veteran
Steve asked on 18 Oct 2010, 07:44 PM
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?

7 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 21 Oct 2010, 02:50 PM
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
0
Joaquín
Top achievements
Rank 2
answered on 15 Feb 2012, 06:31 PM
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
0
Steve
Top achievements
Rank 2
Veteran
answered on 15 Feb 2012, 08:09 PM
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
0
Joaquín
Top achievements
Rank 2
answered on 16 Feb 2012, 11:34 AM
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?

0
Genady Sergeev
Telerik team
answered on 21 Feb 2012, 10:31 AM
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 >>
0
Joaquín
Top achievements
Rank 2
answered on 22 Feb 2012, 10:28 AM
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
0
Genady Sergeev
Telerik team
answered on 27 Feb 2012, 05:32 PM
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.
Tags
ListBox
Asked by
Steve
Top achievements
Rank 2
Veteran
Answers by
Genady Sergeev
Telerik team
Joaquín
Top achievements
Rank 2
Steve
Top achievements
Rank 2
Veteran
Share this question
or