Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
UltraComboEditor embedded in grid not valid on ValueChanged
posted

Hi,

 

One of the columns of my DataGridControl is using an UltraComboEditor (defined as EditorComponent in the InitializeLayout of the grid) to select potentially more than 1 value.
The dropdown is filled using the following piece of code :

ValueList valList = new ValueList();

using (var ingredient = Factory.Ingredient) {

foreach (Data.DataModel.Ingredient.Tbl_Regulation_Type_Master regulationType in ingredient.GetAllIngredientRegulationTypes()) {

valList.ValueListItems.Add(new ValueListItem() { DataValue = regulationType.IRT_Regulation_Type_Id, DisplayText = regulationType.IRT_Description });

}

this.cmbRegulationType.ValueList = valList;

}

 

The list is then binded correctly, showing the correct ticked value(s) when loading the grid.
Moreover, I have attached the event ValueChanged to this component to do some extra operations whenever ticking one or many values in the dropdown.

However, when I’m trying to get the Value on ValueChanged or even simply commit the row, I get the following error :

'Cannot access the Value property when the IsValid property returns false.'

I have checked Infragistics 18.1 sample project, I have the exact same implementation besides the filling of my dropdown (filled by DataTable in the sample).

 

Did I miss something in the declaration of the UltraComboEditor or should I simply bind it to a DataTable instead of a ValueList?

Parents
  • 28925
    Offline posted

    Hello Joel, 

    I recommend validating the cell's value or text properties and not the editor and it's valuelist the columns is assigned. 

Reply Children