Am a new budding programmer. Am learning from your tutorials. There in the video 'WebDataGrid AutoCrud_ ASP.NET Data Grid Control'
public class PersonRepository
{
private IList<Person> _people = new List<Person>();
public PersonRepository()
this.InitializeData();
}
public void Insert(Person person)
this._people.Add(person);
private void InitializeData()
_people.Add(new Person()
FirstName = "Otto",
SecondName = "Parts",
LastLoginDate = new DateTime(2009, 4, 3),
PersonTypeId = 1,
PersonTypeTitle = "Expert User",
Id = 1
});
FirstName = "Gym",
SecondName = "Nasium",
LastLoginDate = new DateTime(2010, 5, 3),
PersonTypeTitle = "Super User",
Id = 2
FirstName = "Nara",
SecondName = "Simha",
LastLoginDate = new DateTime(2009, 5, 3),
PersonTypeId = 2,
PersonTypeTitle = "Poor User",
Id = 3
FirstName = "Kizhakkan",
SecondName = "Pathros",
LastLoginDate = new DateTime(2012, 5, 4),
PersonTypeTitle = "Descent User",
Id = 4
public IList<Person> GetAll()
return this._people;
public void Delete(Person person)
for (int i = 0; i < this._people.Count - 1; i++)
if (this._people[i].Id == person.Id)
this._people.Remove(this._people[i]);
public void Delete(int Id)
if (this._people[i].Id == Id)
public void Update(Person person)
this._people.Insert(i, person);
------------------------------
public partial class Web1 : System.Web.UI.Page
//protected void Page_Load(object sender, EventArgs e)
//{
//}
private PersonRepository Repository
get
if (this._repository == null)
return new WebStateRepository<PersonRepository>().Instance;
return this._repository;
private PersonRepository _repository = null;
protected void ods_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
e.ObjectInstance = this.Repository;
-----------------------------
how
can be done? am not able to move from this point. Kindly help
Hello,
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Hi Shiva Shiva,
Did you checked this blog post from Radoslav Minchev where he explains step by step how to handle manual CRUD: http://es.infragistics.com/community/blogs/developer_support/archive/2012/02/03/webdatagrid-manual-crud.aspx ?
Please let me know if you need further assistance with this.