There is a DataTable , which is a table of 2 columns: ID and Product Name . Tell me how to organize the update of the product name in the DataTable by ID?

    1 answer 1

    DataTable dt = GetData(); int filterID = getFilterID(); dt.AsEnumerable().Where(p => Convert.ToInt32(p["ИД"]) == filterID ).ToList().ForEach( k => { k.BeginEdit(); k["Наименование_товара"] = somevalue(); k.EndEdit(); }); 
    • Thank you, this is what you need. - Alexander Puzanov