Имею такой код: gvEnvironmentGrid.Columns[columnEnvironmentColor].ColumnEdit.EditValueChanged += new EventHandler((object sender, EventArgs e) => { var tempColor = sender as ColorEdit; colorMatchContent.Rows.Cast<DataRow>().Where(r => (((Category)r[columnEnvironment]).Id == environmentCategoryGuid)).ForEach(row => (Category)row[columnEnvironment] = new Category(environmentCategoryGuid, (string)row[columnEnvironmentName], CategoryShape.Rectangle, tempColor.Color)); gcTabColorMatchGrid.RefreshDataSource(); gcTabColorMatchGrid.Update(); }); 

But I have a syntax problem

** the left hand side of the assignment

  • What is not clear? On the left side of the assignment there must be a variable. (if literally) - nick_n_a
  • Assigning an expression to a variable is understandable. In f (x), assign a complex expression — it's hard for me to guess what you want to do. - nick_n_a
  • x = f (x) is true. f1 (x) = f2 (x) is not a valid entry. - nick_n_a

0