I have a user control which has several RadComboBoxes with CheckBoxes set to True.
Some of these combo boxes have cascading datasources and have TextChanged events so when the user changes what items are checked it will re-bind the relevant controls that use this selection.
On the page I have a standard ASP.NET button which gets the values from these combo boxes and updates a chart and table etc. When this button is clicked it is triggering the TextChanged events of the combo boxes which is making the combo boxes think nothing is selected when you can physically see items checked.
I have four combo boxes, ddlProject, ddlUnit, ddlDiscipline and ddlDocType. ddlProject binds unit, discipline and doc type and unit/discipline update doc type. Values don't need to be selected for these for the datasource as if there are no selected items then the SQL statements ignores this in the where clause.
If I don't select anything in unit or discipline there ddlDocType still binds and I can select items but when I click my button the TextChanged events fire and the CheckedItems for ddlDocType is 0. If I have items selected in unit and discipline CheckItems for ddlDocType gives the correct number.
This is the structure of the combo boxes
This is an example of the OnTextChanged event
sender, EventArgs e)
CTRmDataService ctrmDS =
.ddlDocType.DataSource = ctrmDS.GetDocumentTypesForProjectsDisciplineAndUnit(GetSelectedProjects(),
My user control has methods to make the selected items accessible such as :
ddlDocType.CheckItems.Where(x => x.Value !=
.Select(v => v.Value).ToArray<
I've been looking at this for quite a while now trying to figure out why the Telerik control events are being fired when I click the button and why the ddlDocType CheckedItems is bringing back nothing when nothing is selected in Unit/Discipline.
Can anyone help?