Hello everyone,
Using Telerik ASP.NET AJAX Q1 2012 SP1
I'd like to change the drop down arrow of the radcombobox while the combo box loads it's items on the client. Here is some background of what i've done/tested/got working thus far. I have a combobox on the page I've attached a $telerik.$(document).ready handler that calls a function to load the combobox. This all works great. I've read about using the combox.get_imageDomElement(); in the documentation and then setting the src property to a gif. However this does not work.
Documentation Line: http://www.telerik.com/help/aspnet-ajax/combobox-client-side-radcombobox.html see the description for get_imageDomElement()
I've also inspected the return DOM element and tried to manipulate the DOM properties (e.g. style.backgroundImage; currentStyle.backgroundImage) to se the image that way with no luck.
Desired results are as follows: change the triangle image of the drop down to a loading animation gif while the combobox items are loaded, then change it back to the triangle image when everythings ready. This needs to happen client side without post back.
Code examples:
Javascript:
ASPX:
Any help would greatly be appreciated.
Thanks,
Sean
Using Telerik ASP.NET AJAX Q1 2012 SP1
I'd like to change the drop down arrow of the radcombobox while the combo box loads it's items on the client. Here is some background of what i've done/tested/got working thus far. I have a combobox on the page I've attached a $telerik.$(document).ready handler that calls a function to load the combobox. This all works great. I've read about using the combox.get_imageDomElement(); in the documentation and then setting the src property to a gif. However this does not work.
Documentation Line: http://www.telerik.com/help/aspnet-ajax/combobox-client-side-radcombobox.html see the description for get_imageDomElement()
I've also inspected the return DOM element and tried to manipulate the DOM properties (e.g. style.backgroundImage; currentStyle.backgroundImage) to se the image that way with no luck.
Desired results are as follows: change the triangle image of the drop down to a loading animation gif while the combobox items are loaded, then change it back to the triangle image when everythings ready. This needs to happen client side without post back.
Code examples:
Javascript:
$telerik.$(document).ready(
function
() {
LoadComboBox1($telerik.findComboBox(
"RadComboBox1"
));
});
function
LoadComboBox1(sender){
var
myComboBox = sender;
var
myComboBoxImage = myComboBox.get_imageDomElement();
//The loading.gif image is in the same directory as the aspx file
//This is what is not working properly
var
myComboBoxImage.src =
"loading.gif"
;
$telerik.$.ajax({
//ajax post done here removed for clarity this code works perfectly
});
}
ASPX:
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
></
telerik:RadComboBox
>
<
telerik:RadCodeBlock
ID
=
RadCodeBlock1
"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
//See Javascript Code Block Above
</
script
>
</
telerik:RadCodeBlock
>
Any help would greatly be appreciated.
Thanks,
Sean