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
160
Row's BackColor property is not respected for cells bound to ValueList
posted

  1. Create  a Win app
  2. Add o grid on the form
  3. Create a DataTable with a column ot type int
  4. Add 4 rows in table, with values: 1, 2, 3, 4
    1. DataTable table = new DataTable();
      table.Columns.Add("column", typeof(int));
      table.Rows.Add(1);
      table.Rows.Add(2);
      table.Rows.Add(3);
      table.Rows.Add(4);
  5. Create a ValueList (1, "one"), (2, "tow). Do not add items for 3 and 4.
    1. ValueList vl = new ValueList();
      vl.ValueListItems.Add(1, "one");
      vl.ValueListItems.Add(2, "tow");
  6. Set the ValueList for the grid's only column.
  7. In grid's InitializeLayout handler, set the rows backcolor to red (or something else)
    1. foreach (var row in ultraGrid1.Rows)
      {
          row.Appearance.BackColor = Color.Red;
      }
  8. Apply the style Office2007Blue.isl. Or none. Infragistics.Win.AppStyling.StyleManager.Load(@"\Styles\Office2007Blue.isl");
  9. Run the app, the rows back color is red. In ALL cells.
  10. Run the app with style RubberBlack.isl. ONLY the cells displaying 3 and 4 are red. The rest are not.
The BackColor is applied selectively only in cells that are not bound to the ValueList, i.e. 3 and 4.

This is not good.

Is there any fix?


Parents
No Data
Reply
  • 469350
    Offline posted

    My guess is that the ISL file has a setting which is applying to the ShareObject role for a ComboEditor and this overrides the appearance of the row.

    Try opening up the ISL in AppStylist and go to the grid canvas. There are probably some columns on the grid there which have dropdowns and you might be able to track from there and find out which UIRole is affecting it. 

Children
No Data