AJAX :: Keeping Selectedvalue Of CascadingDropDown After Postback?
Jul 30, 2010
I have a cascadingdropdown which works fine using a webservice and is populated. I can save the value of this dropdown to the database buy clicking a save button. However when the page reloads, the list is populated again. Is there a way to keep/set the selectedvalue after postback?
View 7 Replies
Similar Messages:
Oct 20, 2010
I followed a tutorial yesterday to implement CascadingDropDown lists but I can't find many examples of how to retrieve their selected value.
Can this only be done using javascript?
Is there any way to access the SelectedValue of the CascadingDropDown lists in the codebehind?
I'm using them in an EditItemTemplate, in a DetailsView, on a master/details page.
View 2 Replies
Feb 4, 2011
how can i keep a cascadingdropdown value after a user do a postback ?
View 22 Replies
Nov 19, 2010
I am using the AJAX Contol Toolkit and 4 CascadingDropDown extenders with an ODBC connection in a Web Service. The original load of values in each level works great. I then use these values to set the create the SQL for the SelectCommand for a Gridview.
The problem I am having is that when I submit the page to perform the search, the first 2 dropdowns repopulate and set the selected index accordingly, but the 3rd dropdown does not retain its selected value. It does populate with the values, but the selected value does not get set.
The correct values are available for the SelectCommand which returns the correct values.
View 1 Replies
Dec 14, 2010
I have a form for our staff to list an event in a calendar system. In the form, there is a DDL for their Department, and a CasscadingDropDown that provides a list of staff members (the staff list is filtered by Department, as chosen in the first DDL). When the form gets submitted, I need to store the selected values of both DDL's (DepartmentID and StaffID, respectively) into the database.
So, I have a DetailsView, and am using the InsertItemTemplate. Now, I can get both DDL's populated correctly (with the cascade working correctly), and I used custom DDL's derived from the standard DDL class to avoid any Postback/EventValidation problems. But I can't seem to get the values of the user's selected items so I can save them back into the database! I've tried many different approaches, but all I seem to get returned is a value of "".
Here's what I have so far...
[code]....
View 1 Replies
Apr 6, 2010
This would be a simple one for me if I was binding this dynamically. I don't think it's necessary to have a code behind for only 4 or so values. Anyways here is my ddl.
[Code]....
The problem is that when a user selects a value and it postbacks my ddl resets to the first value. How do I prevent this?
View 8 Replies
Jul 1, 2012
I am having problems getting my head around this, so my terminalogy might be off. What I am trying to do is have a dropdown list with different groups, and then two listboxes that run queries based on the selection from the dropdownbox. The left listbox shows all items except those which are in the selected group. The right listbox shows only those in the selected group. I also have two buttons - one to move selected items from the left listbox to the right listbox, and another to move items from the right to the left.
My page has a dropdown list for Groups, populated with 2 records - Group A & Group B. Autopostback is set. When I change my selection on the dropdown list, my two listboxes do change
The problem comes in when I select items in the listbox and click on the transfer button. The records do transfer correctly (that is to say the database query executed correctly and data is moved), but the List boxes are not updated. What I want is to have the form refresh, but there is no AutoPostback for the Button object.
I tried inserting a Response.Redirect back to the same page at the end of the button click event. I thought this would allow me to process the sql command, and then refresh the data. This almost works. It does refresh the listboxes, but it also resets the dropdownbox to the first entry. This in turn changes what is displayed in the listboxes. The data is moved correctly though.
So at this point I have my choice. If the dropdown box behaves and does not change, then the listboxes don't update. If the listboxes do update, the dropdown box resets to the default value.
View 5 Replies
Oct 18, 2010
We were having occasional reports where the value of a set of DropDownBoxs in a GridView would be reset to the first value item in the list.
We finally tracked it down to a timing issue where a user would click Save before the page finished rendering/loading the data, and we are able to repro it on the production server but not locally because the page loads too quickly.
How would we go about detecting this on the server side to know the data returned is invalid or otherwise stop from setting data that the user didn't set?
View 1 Replies
Jan 31, 2010
I have a request:((( Now I can use the TextBox auto-complete but my problem that i use (Key/Value) mean that I should display for example the country name and use the country iso code in the code behind.... so how can I do that by using ajax (TextBox or DropDownList)
View 1 Replies
Feb 2, 2010
Can I Use CascadingDropDown without WebService?
View 1 Replies
Nov 23, 2010
Is it possible to add a new item to cascadingdropdown? I tried ddl_master.Items.Insert(0, "3"), but it doesn't show up. When I view the source in the browser it's there.
<asp:DropDownList ID="ddl_master" runat="server" Width="200" CssClass="ui-state-default ui-corner-all">
</asp:DropDownList>
<ajaxToolkit:CascadingDropDown ID="cdd_master" runat="server" Category="Action"
[code]...
View 1 Replies
Jun 17, 2010
I use the CascadingDropDown to fill several DropDownList in my web to manage different application access rights
I use the Ajax CascadingDropDown component for that.
My problem is that, depending on the application, the selections criterias of the values in my database will be different.
I would like to know if there is a way to get or to identify the name or the ID of the dropdownlist which execute the CascadingDropdown class in the .asmx part (in the "public CascadingDropDownNameValue[] GetApplication1(...)" class ) ??
The name of the DropDownList give me the code of the application manage use to select my data in my SQL query
I don't want to write several query for each dropdownlist like :
public CascadingDropDownNameValue[] GetApplication1(...), public CascadingDropDownNameValue[] GetApplication2(...) etc ...
as they will be create automatically at the loading of the page.
View 6 Replies
Mar 19, 2010
i am using ajax cascading ddl for binding customer, package, device and leadcount.. i need to bind the package by customer, device by customer & package, leadcount by customer & package & device. but we can pass only one value to the webservice method when binding.. but i need to pass 2 or 3 values to the webmethod. how can we do this. also when i select the customer i need to bind all the 3 controls. but in ajax cascadeing ddl we can give 1 parent control id only. i need the solution for this also...
View 1 Replies
Nov 18, 2010
I have a dropdownlist in DetailsView to which items are added programmatically during DataBound event. It is working fine in InsertItemTemplate, but in EditItemTemplate i am getting this error "'branchDDL' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value".
. Following is the code:
<asp:TemplateField
HeaderText="Course"
SortExpression="branchID">[code]....
View 1 Replies
Feb 7, 2010
i am using an div tag for that i am keeping an scroll bar. which is an slider control. now here i need to replace the vertical line image with my own image . and the scroll image to. so it possiable to achive this in the slider control what we are using
View 1 Replies
Jul 1, 2010
I've implemented a cascadingdropdown solution using the demo video here on ASP.NET.
Below is my code for one of my sub-categories. I want to have my sub category controls hidden and only show them if there are sub-categories (not all categories have sub-categories)
So, my question is how to get the count of the subcategories returned by method below and turn on the visibility of the dropdown control from the web method?
View 6 Replies
Jan 27, 2011
I'm using a CascadingDropDown in my page and I need to do the following things :
- Getting the list of elements in the dropdown
- Setting a specific value to the dropdown if it exists in the list
I am a total noob in webservices and javascript so I would like to do this in the codebehind but when I try to get the items of my dropdown, the only one returned is the one that is selected on the client side.
Is there a way to get the full list from the codebehind?
View 15 Replies
Mar 2, 2011
I already used the search, but without success.
I want to use a CascadingDropdown inside an Accordion.
The ParentControlID for the CascadingDropdown is in pane1 and the CascadingDropdown in pane2, but it won't work.
When I put them both into one pane it works. But separated into two panes it doesn't work.
View 3 Replies
Nov 9, 2010
I have two sets of cascading drop down lists they are contained in a detailsview <edititemtemplate>. The problem is that when the user clicks update; the original data is wiped out and the user has to redo the selection of all items contained in a cascading dropdown even if the user didn't want to change that particular aspect of a record. If the user doesn't select everything an error is thrown by the stored procedure in regrds to null values not being valid.
Is there a way i can use cascadingdropdown so that the current values are visible when the user clicks update; meaning that they don't have to redo selections for all items involving drop down lists. The current selections would be default values.
View 5 Replies
May 19, 2010
I have big problem with the CascadingDropDown. I have 60 CDD with one "Child". So on the page are 60 Parents and 60 Childs. When i use FF3.5 everything works fine when he is the only Browser which is connected to IIS
When i use FF3.0 i get Methode ERROR 403 and 500
When i use IE6 i get Methode ERROR 12030 or 403 or 500
When i use Google Chrome no ERROR no content in the List!?
When i use IE8 sometime it works sometime not!?
This errors are not shown on every DropDownList (but on most of them!) I played with the "<jsonSerialization maxJsonLength="50000000" />" in the Web.config which seams to make it work a little bit better.
What can i do to get the CDD working?
I think it is a timing problem. The CDD are not filled in the order i placed them on the page. Local it works better then remote.
Can you help me?
This is my WebService:
[Code]...
View 12 Replies
Jun 13, 2010
I have the method 500 error problem, I have tried to do a simple reproduction of the problem still the same, if I run the webservice [URL] it returns the values needed ok (5) in xml format, but the dropdown always return error 500 inside, here are the codes (Using VS2008, NF3.5, Windows 7), I have the whole day trying to solve this but I just can't:
[Code]....
[Code]....
[Code]....
[Code]....
'WEBCONFIG
[Code]....
View 4 Replies
Aug 19, 2010
I am trying to populate 3 dropdown lists with using CascadingDropDown. DDLs shows make, model and color respectively. The last DDL is having AutoPostBack = true and I am trying to display the values from dropdown in one label control. I am pulling data from a webservice to populate DDLs. I am not getting any error while compiling but when I run the code it shows Error 500. I am not sure where I am going wrong. I am following the tutorial video of 'How Do I' -
[URL]
I am using C# and .Net framework 2.0. Web Service code looks like this
[Code]....
And Web Page Default.aspx looks like this -
[Code]....
I don't understand where i am getting wrong.
[WebService(Namespace = "[URL]/")]
View 6 Replies
Dec 26, 2010
I downlaoded the sample code accompanying the "Cascading Drop Down Control to Access a Database" AJAX Toolkit video, and added the datasets from the sample code to my application running in VS2008 and AJAX 3.5. I think the sample code is in a prior version of AJAX.
When I ran my project I used to get Method Error 500 and after 2 days of searching the web could not get a solution. Finally by chance I recreated the datasets fresh in my app using the wizard as shown in the video and the error dissapeared and the cascading drop down worked beautifully.
View 1 Replies
Nov 6, 2010
I am new to Ajax and i wanted to use the CascadingDropDown to get rid of the postbacks. But somethings wrong and when i debug i am not running any code from the Web Service for some strange reason.
this is my code in the .aspx file:
<asp:ScriptManager ID="ScriptManager1" runat="server">
View 4 Replies
Feb 18, 2010
I am using CascadingDropDown the problem is that the parent of it is not dropdownlist its a textbox.
can i set ParentControlID to a textbox or any other control like a gridview selected row? if so, then how to do that? i tried setting ParentControlID to a textbox but did not work,
View 7 Replies