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
1800
Cell values are disappearing
posted

Hi,

I have a ultrawingrid 10.3. I'm trying to allow editing with ultradropdowns as valuelist for one of the columns in the grid. I was able to get the dropdown for the column, but if i select a value, it doesn't show up in the grid cell. Other columns are editable and retains the values when i edit and leave the cell, but the dropdown column is not retaiing the selected value. It just ignores the values and displays empty data.

Below is the snippet. I'm using binding list to set the grid source.

 customerBindingList = new BindingList<Customers>(lstCustomersl);  
 ultragrid1.DataSource = customerBindingList ;

  uddCustomer.SetDataBinding(listCustomers,null);
  uddCustomer.ValueMember = "CustomerID";
  uddCustomer.DisplayMember = "CustomerName";

<Grid Initialize Layout event>

{

e.Layout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True;

 ugBand.Columns["CustomerName"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown; 

ugBand.Columns["CustomerName"].ButtonDisplayStyle = ButtonDisplayStyle.OnCellActivate;

 ugBand.Columns["CustomerName"].ValueList = uddCustomer;

}

Am i missing something ?

  • 469350
    Offline posted

    Hi,

    I think you might be mismatching the data types here. I would assume that the CustomerID field is a numeric field and that the CustomerName field is a string. So your DropDown is trying to put numbers into a string field, which doesn't make sense.

    The DataType of the ValueMember field of the UltraDropDown needs to be the same as the DataType of the grid column to which the UltraDropDown is attached.

    If that's not the problem, then I'm not sure why it's not working.