Спереди:
Код: Выделить всё
Код: Выделить всё
DataTable table = new DataTable();
table.Columns.Add("ID", typeof(System.Int32));
table.Columns.Add("idimg", typeof(System.Drawing.Image));
DataTable dt = new DataTable();
dt = galFac.getCurrentUsersElements(3);
if (dt.Rows.Count > 0)
{
foreach (DataRow item in dt.Rows)
{
table.Rows.Add(item["Id"]);
}
GridViewProduct.DataSource = table;
GridViewProduct.DataBind();
GridViewProduct.UseAccessibleHeader = true;
}
Спасибо.