A Webdropdown on my contains multiple selected items. An user action causes the bespoke Webdropdown to be databound again, after which it contains a new list of items. Now i want to restore the items that were selected before this databinding, however it can be that the newly databound wdd does no longer contain items that were selected before. Thus i only want to "restore" the selection of items that are present in the newly databound wdd. How do I select these items that were selected before and select them again if they are present after databinding ?
Hello Henning,Thank you for contacting Infragistics Support.There could be several implementations how to persist the DropDown selection. I have created a CodeSample and I used a session variable to store the selection. After the DataSource for the DropDown is changed on btn click, a check is made if the new DataSource matches values from the previous selection and selects all matching. I have also included another DropDown and select all values ServerSide regarding this forum post of yours. http://ko.infragistics.com/community/forums/t/85513.aspx
Thanks for your suggestions, but your select all code sample throws a null exception error for the items of the particular webdropdown when i ran it (DropDownItemCollection Items = WDD3.Items;)
Hello ,
I have retested the sample and works fine on my configuration, for both scenarios. Please make sure, that the WebDropDown IDs in the markup have names ID="WebDropDown1" and ID="WebDropDown3". In copy/paste scenarios it is possible that visual studio rename some of the IDs. Thank you for contacting Infragistics Developers Support!
I realized this, however if i use the this. keyword everything works just fine
I am glad that this is helpful to you. Thank you for posting in the community.