Hi,
I downloaded trial version of Webdropdown version:11.2.20112.1019 and started using that in my application to see whether it functions properly. If it works well, I can go ahead to buy paid license for this control.
It has been around 45 days I downloaded the control and now I am able to see one issue suddenly.
When I use $find("webdropdowninstance"), it retrieves NULL.
Is it because the trial version might have expired or there is some other issue. Please let me know.
Hi, Sunil Mehta.
You can check this forum post, I think it will help you. If you have some other questions don't hesitate to ask them.
Best regards,
Nikolay
Hi Nikolay,
I have tried using ClientIDMode="Static" like this:
<ig:WebDropDown ID="dropdown" runat="server" ClientIDMode="Static">
</ig:WebDropDown>
After this, I tried using $find("dropdown") and also #find("<%=this.dropdown.clientID%>") but both are returing NULL value and not the object. What may be the issue?
Note: I am using ClientIDMode as "AutoID" in web.config file and I am not looking for a solution to make ClientIDMode changes in web.config.
Here you can find the list of all WebDropDown client-side events. All of them accept 2 parameters: sender, which is reference to the WebDropDown client-side object; args - specific arguments for all the events. In this list you can find the different types of event arguments. The other option is if you have IntelliSence in your Visual Studio, it will show you all the possible values for the client-side events and you don't need the help.
In the second of your posts, the items that are in bold, I suppose are the values of any drop down item. So you can take them using the following code:
function wdd_Initialize(sender, args) {
// use this line of code if you are inside WDD client-side event handler.
var wddObject = sender;
// use this line of code if you are referencing the WDD from exteranl function.
// var wddObject = $find("<%=wdd.ClientID %>");
// get the value of the first item - "0901|0"
value0 = wddObject.get_items().getItem(0).get_value();
// get the text of the first item "ADR"
text0 = wddObject.get_items().getItem(0).get_text();
}
I have also one other suggestions for you. When you want to understand what methods are supported by the client-side WDD object, just put a breakpoint in you browser at the wddObject variable. Then, at runtime, you can inspect all the properties and methods of the control and find the most appropriate for you. This is what I'm doing. So finally if you want to focus on an element you need again to use the JavaScript method focus(). You just need to know which element you want to focus and to find it using the WDD client API. If it's the whole drop down I suppose it will be fine to use wddObject.focus(). But you need to investigate and check this.
Best regards, Nikolay
Thanks for the reply.
value0 = wddObject.get_items().getItem(0).get_value(); works if we know the index of the item. My requirement is to retrieve value of selected item and not by index. I can find the index of the selected item and then use the above code snippet but that will be extra calculation for me. Can you please let me know the method to get the above kind of values like "0901|0" for a selected item.
FYI, I tried using
var value1 = $find("webdropdown").get_currentValue();
but this gives the text of the current item and not the value.
The right method for you is not get_currentValue() but get_selectedItemIndex(). To get the value, use:
function wdd_SelectionChanged(sender, args) {
// use this line of code if you are inside WDD client-side event handler (now in SelectionChanged event).
var wddObject = sender, // in your case $find("webdropdown")
selectedIndex = wddObject.get_selectedItemIndex(),
value;
value = wddObject.get_items().getItem(selectedIndex).get_value();
Thanks Nikolay. We are very near to closure now. Here is another issue.
I have a function that fills a combobox with values based upon the value changed in another combobox control.The below function does that requirement:
function FillCombobox(Code,strValue) {var NextCombo;var appPath;var getFile;var countall;appPath = location.href;getFile = appPath.split("/");countall = getFile.length - 1;appPath = appPath.replace(getFile[countall], "FillSubCombo.aspx");
if (strValue !='') { var oXMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" ); var sURL = appPath + '?Code=' + Code + '&Value=' + strValue; oXMLHTTP.open( "POST", sURL, false ); oXMLHTTP.send(); if(oXMLHTTP.responseText!=''){
if (document.all.combobox.popup.length > 0) { var combolen = document.all.combobox.popup.length; for (var j=(combolen - 1); j >= 0 ; j--) { document.all.combobox.popup.options[j] = null; } } var opt0 = new Option("",""); document.all.combobox.popup.options[document.all.combobox.popup.length] = opt0; var sXMLReturn=oXMLHTTP.responseText; var MList = sXMLReturn.split('^'); for (var i=0; i < MList.length;i++) { var SList = MList[i].split('~'); var opt = new Option(SList[0],SList[1]); document.all.combobox.popup.options[document.all.combobox.popup.length] = opt; } document.all.combobox.popup.item(0).selected = true; document.all.combobox.popup.textfield.value = document.all.combobox.popup.item(0).text; } else { var opt0 = new Option("",""); document.all.combobox.popup.length=0; document.all.combobox.popup.options[NextCombo.length] = opt0; document.all.combobox.popup.item(0).selected = true; document.all.combobox.popup.textfield.value = document.all.combobox.popup.item(0).text; } } else { document.all.combobox.popup.item(0).selected = true; document.all.combobox.popup.textfield.value = document.all.combobox.popup.item(0).text; } }
Currently, the combobox that I am using in my application uses the below code snippet:document.all.combobox.popup.optionsDo we have any property/method in the webdropdown with the same functionality as options? I want to replacethe above lines in Bold with the code snippet for infragistics webdropdown.
I'm not familiar with the old ComboBox and I'm not sure if I understood the right purpose of the options method. I found a method set_props() but I'm not sure if it's proper for your case. If not, you can describe me exactly what you want to achieve.
$find("webdropdown").set_props(value);
If it's not a problem for you, please create different forum thread for this issue. It's because the last problem is different from the title and idea of the current forum thread and it such cases is better to separate them.
Thank you
Is there a way to set the current display text and value of a webdropdown in the server-side(code behind vb file)?
Thanks,
Sunil Mehta.
Hello Sunil,
With your trial account you can create cases in our system as well.
You need to log in to your account on our web.
After that go to “Help” section in the sub menu find “Submit Support Request”. Now you are ready to select the technology, platform, etc.
According to the last your question. About the licensing you will need to contact our sales team it will not take a long time. Call them or email them. This page is for reference to their contact details:
https://es.infragistics.com/about-us/contact-us/
If you need additional assistance, do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Nikolay, Please do the needful for #1, #2 and #5.
For purchasing you need again Sales team.
About #1, #2 and #5 you need to create a case in the Developer Support. If you don't know how I will tell a colleague from DS team to help you.
About #4, try this:
.igdd_IGListItemHover a { color: green!important; }