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.
I am not accessing database from javascript. I am accessing database in a vb file and then by using AJAX in javascript, i am getting the values in javascript file. The variable "oXMLHTTP.responseText" contains all the values for a particular webdropdown in the .js file. I just want the items in "oXMLHTTP.responseText" variable to be loaded into the webdropdown.
Also, I am not able to understand exactly what I need to do in the server side in the "topic" link that you have shared above.
Even you are accessing the values in the server-side you also need to bind the drop down with this values on the server. The architecture of the control doesn't allow you to load the items from your response in the client. Or it is possible but again, when you add every item on the client you should have OnItemAdded server-side event handler for every new item. I discussed this in the previous post and I don't think this is good idea.
That's why you need to go through the topic and understand it in details, because I think this is the best way for creating cascading drop downs. To summarize the idea of the topic:
1. You need to bind both drop downs on the server with appropriate data sources.
2. When you change a value in the first drop down, inside the client-side event SelectionChanged of the first drop down, you call client-side loadItems method of the second drop down.
3. This client-side loadItems fires the server-side event ItemRequested for the second drop down and passes the value that comes as selected value from the first drop down.
4. Inside ItemRequested you need to filter the data source by this selected value. This means you need to get the filtered values from the data base, that you need for the second drop down. After that you just bind the second drop down with the filtered data.
I hope this will help you.
Best regards, Nikolay
So, you mean to say that I can define "ItemRequested" server-side event in my code-behind .vb file of the aspx page. Can you please give me an example on how to define the server-side event including the delegate and classes that needs to be defined.
Thanks,
Sunil Mehta.
Nikolay,
I have created a procedure on server side with handler as "ItemsRequested" of the dropdown. But I am not sure how to access the value of group dropdown in this procedure. Do you know how to do that?
The next code works on my machine I hope to work for you too:
In ASPX:
<script type="text/javascript">
function categoryChanged(sender, e) {
var productDropDown = $find("<%= productDropDown.ClientID %>");
productDropDown.loadItems(e.getNewSelection()[0].get_value());
}
</script>
<ig:WebDropDown ID="WebDropDown1" runat="server">
<ClientEvents SelectionChanging="categoryChanged"/>
<ig:WebDropDown ID="productDropDown" runat="server" OnItemsRequested="productDropDown_OnItemsRequested">
In Code-behind:
protected void productDropDown_OnItemsRequested(object sender,
Infragistics.Web.UI.ListControls.DropDownItemsRequestedEventArgs e)
{
string valueFromTheFirstDropDown = e.Value.ToString();
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; }