private void comboOffice_ValueChanged(object sender, EventArgs e){ //Check if Office in Ultracombo#1 was changed if (comboOffice.Value != null) { string office = comboOffice.Value.ToString(); //comboCurrLoc is the 2nd Ultracombo on the form, should only display sites based on the user's selected office comboCurrLoc.Rows.ColumnFilters.ClearAllFilters(); comboCurrLoc.Rows.ColumnFilters["OFFICE_CODE"].FilterConditions.Add(FilterComparisionOperator.Equals, office); comboCurrLoc.Value = null;}
I feel that I'm close, but when I change the value of the office in Ultracombo#1, the second combobox is blank. Is there something else I should be adding to make the 2nd Ultracombo display the correct values?
When you say "the second combo is blank", what exactly do you mean? There are no rows on the list? Do you still see the column headers? If there are column headers and no rows, then it sounds to me like you are filtering out ALL of the rows. If the OFFICE_CODE value a string field? Seems like this is some kind of key field and is probably numeric. If that's the case, why are you converting the filter value to a string?
The second combo does not display any rows, but does show the column headers. The OFFICE_CODE value is a vachar2(3) data type (Oracle), that's why I'm converting it to a string. So I understand, if I use this statement:comboCurrLoc.Rows.ColumnFilters["OFFICE_CODE"].FilterConditions.Add(FilterComparisionOperator.Equals, office);This will filter rows so that only the rows that have the specific office value (passed in) are displayed, correct? I assume if I do a Row.Count() before and after this statement, I should see if it's being applied correctly? I forgot to mention that I also changed the .DisplayLayout.Bands(0).Override.RowFilterAction property to "HideFilteredOutRows". Could this be causing a problem?