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.
Thanks Nikolay for the reply. Do you have any reference document for client side events. I would like to know about "ValueChanged" and "ValueChanging" as well.
Moreover, can you tell me the code-snippet to focus on a webdropdown. In my application, I was using the below line to focus on the old combobox:
document.all.combobox.popup.textfield.focus();
Thanks,
Sunil Mehta.
One more thing. I chose "View Source" after implementing the webdropdown in debugging mode and i am able to see the below details:
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();
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)?
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://ko.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://ko.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; }