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. 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);
Best regards, Nikolay
Here is the explanation as what is happening in the above function. We would like to achieve the same functionality with the webdropdown.
There are 2 categories of webdropdown we have, one is a group webdropdown with values like 0100, 0200, 0300, 0400 and so on. All these values are retrieved from tables. Other is a sub webdropdown which loads value based upon the value in the group webdropdown. For example, if 0100 is being selected in group webdropdown, then the sub webdropdown will load all items starting with "01" and not any other values. Similarly for "0200", all values starting with "02". These values are also being retrieved from tables and sent to javascript under "oXMLHTTP.responseText". This object includes all the values to be loaded into sub webdropdown based upon the value selected in group webdropdown.
Now where I am getting the problem is: how to load these values into the sub webdropdown.
1. If (oXMLHTTP.responseText !='') // means sub webdropdown values have been fetched from tables
then, load all these values in the sub webdropdown. // We would like to know how to achieve this.
if 10 values have to be loaded in the sub webdropdown, then the cursor should be on the first one. The, from the 10 values, user can select any value if required.
2. If (oXMLHTTP.responseText = '') // means no values have been fetched from the tables.
then sub webdropdown should be empty. // We would like to know how to achieve this.
This entire functionality will be executed when the value in the group webdropdown changes. We are calling a function that executes these functionality on "valueChanged" client-side event of group webdropdown.
Thanks,
Sunil Mehta.
First of all I suggest you to read this topic and if you think it's proper, use the approach that is proposed.
In your sample you are using AJAX to take the data for the second drop down and I suppose you want to bind that data on the client. As far as I know this is not possible to happen only on the client-side, because the WebDropDown has only server-side data source, and if you want to add a item on the client it also should be added on the server. Even there is a client-side method for adding an item, if you want to use it you will need to add handler for the server-side OnItemAdded event and inside that handler you will need to add this new item to the drop down data source:
<script type="text/javascript">
function WebDropDown1_client_SelectionChanged(sender, args) {
var newItem = sender.get_items().getItem(0);
sender.get_items().add(newItem);
}
</script>
<ig:WebDropDown ID="WebDropDown1" runat="server" OnItemAdded="WebDropDown1_server_OnItemAdded">
<ClientEvents SelectionChanged="WebDropDown1_client_SelectionChanged"/>
So here you have one other problem. To add a new item to the drop down, it should be from type Infragistics.Web.UI.DropDownItem, which you can hardly create(In the code above, I'm just duplicating the first drop down item). And second - you are using AJAX, but again you need postback to add the new item, which I don't think it's good for the performance. Again I will suggest to to use the approach from the this topic.
If you want client-side binding you can use igCobmo, but it's part from our jQuery product.
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.
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; }