Hi There,
I've got what seems to be something simple to sort out but is driving me (3 months experience with ASP.NET) crazy. I have a set of cascading dropdownlists on a form. In the order that they appear the fields are ddlManufacturer, ddlYear, ddlModel, ddlModelSeries. The initial field that is shown is ddlManufacturer. After the select of this field, ddlYear is shown. After the select of this field, ddlModel is shown. After the select of this field, ddlModelSeries is shown. A web service runs asynchronously on selectedIndexChanged to populate each subsequent field. So when the manufacturer is chosen a webservice runs to populate the ddlYear field. The the year is chosen a webservice runs using the manufacturer and the year to populate the ddlModel field. Lastly, when the model is chosen a webservice runs using the manufacturer, year and model to populate the ddlModelSeries field.
If all the fields are chosen and the user decides to change the manufacturer selected value, the ddlModel and ddlModelSeries fields are hidden until the new year value has been selected. Now this is where the problem is. If the year value that has been previously selected, exists as a valid year for the new manufacturer, the year model remains selected. You can immediately see the problem here - the next field will only be shown and populated on 'selectedIndexChanged'. So the user would have to selected another year and then reselect the correct year again. This would then show the next field. Subsequently, if the user decides to revert to the original manufacurer, the previous year value is still shown. Again, select another year value and reselect the correct one to reveal the next field. Again, the same problem. The previous model value is shown with the next field not displayed. The user would have to change the model and then select the correct model to reveal the next field. This is quite annoying and certainly not how this would be expected to work.
I noted a javascript function on the 'onchange' event of the manufacturer field. This function sets the selectedIndex of the 3 child controls to 0 as well as to set their 'contextKey' to nothing. This function runs perfectly and I see the values changed to what I have noted but the problem described above still persists. Oh and I have made sure that the javascript function runs before the next fields webservice runs.
I hope that I have explained the issue in enough detail. If anyone has a solution, please let me know as I'll soon have about 4 strands of hair left on my head ... :)
Thanks
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please create a new inquiry.
I've got what seems to be something simple to sort out but is driving me (3 months experience with ASP.NET) crazy. I have a set of cascading dropdownlists on a form. In the order that they appear the fields are ddlManufacturer, ddlYear, ddlModel, ddlModelSeries. The initial field that is shown is ddlManufacturer. After the select of this field, ddlYear is shown. After the select of this field, ddlModel is shown. After the select of this field, ddlModelSeries is shown. A web service runs asynchronously on selectedIndexChanged to populate each subsequent field. So when the manufacturer is chosen a webservice runs to populate the ddlYear field. The the year is chosen a webservice runs using the manufacturer and the year to populate the ddlModel field. Lastly, when the model is chosen a webservice runs using the manufacturer, year and model to populate the ddlModelSeries field.
If all the fields are chosen and the user decides to change the manufacturer selected value, the ddlModel and ddlModelSeries fields are hidden until the new year value has been selected. Now this is where the problem is. If the year value that has been previously selected, exists as a valid year for the new manufacturer, the year model remains selected. You can immediately see the problem here - the next field will only be shown and populated on 'selectedIndexChanged'. So the user would have to selected another year and then reselect the correct year again. This would then show the next field. Subsequently, if the user decides to revert to the original manufacurer, the previous year value is still shown. Again, select another year value and reselect the correct one to reveal the next field. Again, the same problem. The previous model value is shown with the next field not displayed. The user would have to change the model and then select the correct model to reveal the next field. This is quite annoying and certainly not how this would be expected to work.
I noted a javascript function on the 'onchange' event of the manufacturer field. This function sets the selectedIndex of the 3 child controls to 0 as well as to set their 'contextKey' to nothing. This function runs perfectly and I see the values changed to what I have noted but the problem described above still persists. Oh and I have made sure that the javascript function runs before the next fields webservice runs.
I hope that I have explained the issue in enough detail. If anyone has a solution, please let me know as I'll soon have about 4 strands of hair left on my head ... :)
Thanks
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please create a new inquiry.