Hi,
When the page loads the WebDropDown is populated with a dataset which is then set to nothing.
When I select a value in the table in the dropdown I populate other textfields based on the values read from the selection in the table in the dropdown.
After that page is posted back, the values in the table in the webdropdown are no longer visible but when selected the values from the selected item do populate the textfields correctly.
It seems that the data is not visible but is there to select from.
Does anyone have any suggestions, I have pretty much exhausted my options?
Thanks!
If you are using <ItemTemplate> you will have to rebind (call DataBind() on the control), after every postback. Data Items are not stored into ViewState , therefore your DataBinding expressions will not evaluate any data.
Thanks,
Angel
I am not using <Item Template> at this point and when I add the line of code wddRecipients.DataBind() at the very end of Page_Load just before the End Sub, I get the following error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[NullReferenceException: Object reference not set to an instance of an object.] Veritext.VIP21.Web.SendNotices.RecipientChanged() +119 Veritext.VIP21.Web.SendNotices.wddRecipients_ValueChanged(Object sender, DropDownValueChangedEventArgs e) +70 Infragistics.Web.UI.ListControls.WebDropDown.OnValueChanged(DropDownValueChangedEventArgs e) +115 Infragistics.Web.UI.ListControls.DropDownBot.RaisePostDataChangedEvent() +2035 Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() +213 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent() +34 System.Web.UI.Page.RaiseChangedEvents() +165 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485
I was instructed to upload my code so I zipped up my project and have been trying to send it but it seems the file will not upload. Still in desperate need of help!
I'm having the same problem, any solution so far?
I'm using itemtemplate and when I remove it, it works fine, but I really need itemtemplate.
Thanks
John
I received the following response from Infragistics ...
I’ve research you sample and I am able to compile it but when I run TestControl.aspx I need of some kind of dump database to simulate your scenario. Would you be able to send me a backup of your db with a few records? I see that you are using the RTM build of 9. 2 version. There are a few service release after this version and I would suggest to upgrade and test with it. It is possible this issue to be resolved in it. You could download the latest service release (hot fix ) from our website under your account.
Mickey
When I tried to install the latest service packs I encountered an error and I sent them the following update to my ticket ...
"I downloaded the Service Release NetAdvantage_ASPNET_20102.2101_SR.msp and tried to install it. Once downloaded I extracted the files onto my computer and then double-clicked on the .msp file provided in the zip file. Then I get the msg. that reads "The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."I can not get through to your phone support because it disconnects when I make any selection from the main calling screen. Please let me know how I can resolve this!"
I wanted to see if anyone receives the same error.
In addition to that I called and was talking to a tech for developer support and he put me on hold for over 15 minutes when I finally hung up and called back and now my call has been next in the queue for 30 minutes!!!
This is ridiculous!
Here I'm sending a zip file with three files where you can see the problem, it is a very simple web form without accessing the database. It has 2 drop down lists, the first one is data binned to a data table and once a value is selected the second one is filled from the same data table but using LINQ (that's how my application is working). At first I was losing the values on the lists because of the post backs so I had to the data bind again after each post back and then I had to reestablish the selected index, this works fine for the first list but not for the second one, on the second one I'm able to reestablish the values but not the index, any idea why?
John Diaz
Hello John,
Thanks for the code. I run it and I see that you do not invoke DataBind for the second DropDown as you do for the First one. Once I make this change the control behaves correctly :
protected void LoadW2() { var cpcodeLINQ = from cpcoderow in Test.PruDT.AsEnumerable() //where (cpcoderow.Field<string>("Code").Equals(GroupCodeDDL.SelectedValue)) //orderby cpcoderow.Field<Int16>("loccode") select new { code = cpcoderow.Field<string>("Code") }; WebDropDown2.DataSource = cpcodeLINQ; //Added by me WebDropDown2.DataBind(); }
Also I would suggest replace AutoPostBack property with the following one : AutoPostBackFlags-SelectionChanged="On"
Attached is your modified sample.
Hope it helps.