We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with State Maintainance with DropDown control(Ajax)

Thread ID:





45492 Jun 22,2006 04:26 AM UTC Jun 30,2006 05:59 PM UTC ASP.NET Web Forms (Classic) 5
Tags: Tools
manoj singh
Asked On June 22, 2006 04:26 AM UTC

Hi, I have query related to maintaining state in different postbacks for Dropdonw control(ajax). For example :- I have three dropdown control in my web page, all are dependent on each other. On select of 1st, 2nd will populate and on select of 2nd the 3rd dropdown will populate. Now I have processed my page and going to some other web page and again I am coming back to same page where all these dropdowns were there. So what I am looking is all the dropdown should have same values selected as I had left it. so my question is. 1>Can I have multiple dropdowns which will be interdependent on each others selection?? 2>Can I maintain States of these dropdowns selection in different postback?? As maintaing state is problem with other third party controls like "Component Art & ATLAS". please help me.. thanks & regards, manoj singh.

Administrator [Syncfusion]
Replied On June 23, 2006 12:25 AM UTC

Hi Manoj, 1)Yes, It is possible for you to have multiple dropdowns where each of these can be updated based on the another dropdown control. Please have a look at our ''ListBoxSelect'' sample that ships with our Essential Studio/Tools install under Callback controls category which explains a similar scenario using 3 listbox 2)Yes, you can maintain states of the dropdowns selected even after a postback if the enable viewstate of the callback panel is true. you can check this by keeping a button and clicking on it in the above sample. you can see the viewstate is not lost after postbacks. Regards, A.Sivakumar

manoj singh
Replied On June 28, 2006 05:32 AM UTC

Hi Siva, Thanks for your help, I have another question like, can I remove this viewstate. In my project, I am checking for HTTP_Referer, so if user is coming from certain page I want viewstate to be maintained and if he comes from another pages then those viewstates should not be visible. So Currently I have tried from ViewState.Remove() and ViewState.SetDirty(True) but both of them is not working out. SO can you help me please. Thanks & Regards, Manoj Singh.

Administrator [Syncfusion]
Replied On June 28, 2006 06:26 PM UTC

Hi Manoj, Yes, It''s possible to remove the viewstate of a callback panel by specifying its enable view state to false. I guess in your sample the following code should help. In Page_Load() //Or in PageInit { if(pageReferer == Something) this.callbackPanel1.EnableViewState = false; else this.callbackPanel1.EnableViewState = true; } We might be missing something, because we don''t quite understand the scenario. Thanks, A.Sivakumar

manoj singh
Replied On June 29, 2006 06:46 AM UTC

Hi Siva, I will explain my problem like this. 1> I am coming on page(for first time), user has some values populated in dropdown(based on their login''s) 2> Now user changes some of those dropdown values and generates reports on those selection 3> Now I want to set the viewstate to "true" as while generating report user passes through many pages, so after generating report he automatically comes back to same page. So at time point user should have all those selected values for which he has created report.(Done via ViewState = True) 4> Now User clicks on any other link and goes to some other page, and comes back to same reporting page. 5> At this moment user should have same values as selected in step 1 (this is default selection) But my problem is when user comes to step 5, he is getting same selection as step 3. So how to set the values for step 1. I hope i am clear enough to make u understand my problem Please ask if u didnt get wht i mean to say. Thanks & Regards, Manoj Singh

Administrator [Syncfusion]
Replied On June 30, 2006 05:59 PM UTC

Hi Manoj, Please have a look in to this forum Best Regards, A.Sivakumar


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon