Hi All,
I am trying to use a Webdropdown Control with Multi selection Option Enable and Which is placed in a Update Panel/without Update Panel in Asyc mode as I donot want the control have any postback . based on the Items Selected in this Control i am trying to fill another Dropdown Controls.
But This is Giving the Following Javascript error and Stopping the Funcionality of the Controls.
and if i debug this error found that it is happening in the scripts generated by the infragestics Controls. i tried different way to eliminate the error by changing the control properties page properties. but nothing worked.
Please help me with this error as I have got stuck with this from last 3 days.
Thanks & regards
Balakrishna...
Hi Balakrishna,
Could you please attach your ASPX page, and any code behind that you are using? I will be glad to help you.
Thanks,
Angel
Hi Angel,
Thanks for Replying.
I have Attached the Aspx and Cs file in the attachment. Please Do the needful.
Scenario for the Application:
Basically i am working on a Search page where i will be having 8 Dropdowns in 2 rows which are Dynamic in Behaviour i.e. Based the Database Perferences i will be positioning and Hidding/Showing the controls on to the page.
out of the 8 Dropdownlist one is a dropdown with Multi selection enable in the first row. i.e. dropdown with checkboxes.
in the First Level user can select any dropdown according his wish. based on which the remaining dropdown will be filled i.e. Criscross based Searching.
the next level is forward only dropdowns .
in the first level based on the selection of the first Dropdown The Structure of the other Dropdown will be determined. i.e. there sequence and visibility. and the Second levels first dropdown will be filled.
I am trying to do all this functionality without any postback. because of which i am trying to use Updatepanel with Updatemode as Conditional.
i was able to Achieve the Above said functionality using the normal asp.net control except the Multi selection of the Dropdown. because of which i am trying to Use the infragistics in the place of the Normal controls.
even if you can help me with any way to have a Checkboxlist control placed in the dropdownlist of the ASP.net. that would even serve my purpose.
Thanks one again for Replying. i would be very happy to Receive your Help.
Thanks ®ards
BK
Hi,
If your scenario is different than what's in the ASPX and code behind, please attach the full sample so that i can make it work or suggest workaround if possible.
About the screenshot error - i think this is not quite related to the WebDropDown. This probably happens because somewhere in your code, you have stuff like :
var dropDown = $find(<%= WebDropDown1.ClientID %>);
If you replace that with this (below) it should work:
var dropDown = $find(<%# WebDropDown1.ClientID %>);
But again, if I can have a look at your full scenario, i should have a better idea about what could be wrong.
Maybe instead of adding a control in the ValueChanged event, you can have the control initially, but just make it not Visible. (i.e. Visible=false), and then only change the Visible property to true). I think this should help.
HI Angel,
Sorry to bother you again,
I have attached a Sample Application with the Functionality I am Looking for with Post back.but i need the same functionality without any postback.
Current value
<AutoPostBackFlags ValueChanged="On" />
for async the value of the WebDropDown1 but the functionality does not work
<AutoPostBackFlags ValueChanged="Async" />
and Also in the same page I have Even Place the Code which i have done using normal control and the update panel . in this the functionality happens without any post back. using infragestic Controls i need the same kind Functionality.
that is the reason i was using update panel to have the functionality without any postback but when i use update panel . Above said i.e. First Posted Error Comes up and stops the functionality.
Please do let me know if there is any other way or work around to get the same functionality as my client does not wants to see any postbacks on his selection.
For reference you can even visit http://www.showmetheparts.com/ in which the dropdown work with out any postback even i am looking for the same kind of Functionality add to that i even have the Dynamically adding the controls as per perferences in the DB.
in the Sequence which is there in the DB.
i.e. Make-model-year
Year-make-model
model-make-year
Please do the needful.
There is always a postback - Both "On" and "Async" do postbacks.
I think if you refer to my last post and set EnableDropDownAsChild=True, your original scenario with the UpdatePanel will work fine, without the need to set Async for the autopostback flags.
When I place the infragestic Control in the Updatepanel and have the Functionality which I attached in the sample in the pervious post.
It is Giving the same Error which i posted in the first Post. I tried the suggested change i.e. EnableDropDownAsChild="true" but still the same Error.
if possible can u send me the sample with the functionality which i have sent to you with the normal ASP.net. i.e. Controls should get Created and Controls state Should be Changed without any post back on the screen as like the one which i attached in the pervious post using the Updatepanel.
if possible can u can contact me on my ID. krishna.saka@dhanushinfotech.com
Hello,
I have created a sample WebSite that is working for your scenario (attached).
If you still encounter issues, please contact the Infragistics Development Support for further in-depth investigation of the issue:
https://ko.infragistics.com/support
Thanks for u r Support i was able solve the Problem. it was issue with the web.config File as in my webconfig File it was complete referring to old version of the System Namespaces i.e. 2.0 and 1.0 in some place
and in the Webconfig File of Your it was pointing to the 3.5 Version i just copied your WEbconfig into my System and It works Wonderfully.
Thanks a Lot for your patience and Support. i would really Appreciate that.
but I got one more small issue i.e. after getting the Dropdown build. when i am Trying to Bind the Control with the Datatable setting its TextField and Value Field , it is showing the Values For the First Time and From the Next time it is Showing empty Text and Value though I am able to List items it is showing Empty Text.
it would be Great if you can Even Help me with this. My work would be almost Done.
FYI
protected void WebDropDown1_ValueChanged(object sender, Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs e) {
WebDropDown2.Items.Clear(); DataTable dt = new DataTable(); dt.Columns.Add("name", typeof(string)); dt.Columns.Add("id", typeof(int)); DataRow dr = dt.NewRow(); dr["name"] = Convert.ToString("test" + DateTime.Now.ToString()); dr["id"] = Convert.ToInt32(1); dt.Rows.Add(dr); dr = dt.NewRow(); dr["name"] = Convert.ToString("test12" + DateTime.Now.ToString()); dr["id"] = Convert.ToInt32(1); dt.Rows.Add(dr); WebDropDown2.DataSource = dt; WebDropDown2.TextField = "name"; WebDropDown2.ValueField = "id"; WebDropDown2.DataBind(); DIV1.Controls.Add(WebDropDown2);
}
For the First time It is showing the Value but for the next it is Showing. Please do the needful