public static GridDataItem UpdateItem(OrderedDictionary keys, OrderedDictionary newValues) { var id = Convert.ToInt32(keys["ID"]); var item = GridDataItem.GetData().First(i => i.ID == id); LoadNewValues(item, newValues); return(item); }
protected void Page_Init(object sender, EventArgs e) { ASPxGridView1.DataSource = GridDataItem.GetData(); if (!IsPostBack) { ASPxGridView1.DataBind(); } }
protected GridDataItem DeleteItem(OrderedDictionary keys, OrderedDictionary values) { var id = Convert.ToInt32(keys["ID"]); var item = GridDataItem.GetData().First(i => i.ID == id); GridDataItem.GetData().Remove(item); return(item); }
public static GridDataItem InsertNewItem(OrderedDictionary newValues) { var item = new GridDataItem() { ID = GridDataItem.GetData().Count }; LoadNewValues(item, newValues); GridDataItem.GetData().Add(item); return(item); }
protected void Page_Init(object sender, EventArgs e) { Grid.DataSource = GridDataItem.GetData(); Grid.DataBind(); }