hi all...
am new to inforgistics and am a budding programmer.I am really so happy to see all the features that I was once wishing to be there in my application. am learing from tutorials.
there I had one doubt abt
public partial class Web1 : System.Web.UI.Page
{
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;
---------------------------------------------------------------------
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);
----------------------------
then how
is created? I tried a lot and I couldnot find this.. Kindly help
Hi apalcer,
It has been some time since your post, however in case you still need assistance I would be glad to help.
As far as I can understand, after adding the new row through the grid UI, an AJAX call is occurring for you. Please ensure that the new row is being added to your datasource. If using AutoCRUD, the grid's data source also needs to support automatic CRUD operations (otherwise manual CRUD should be employed).
If you need to access the new row object clientside, this can be done in the RowAdding clientside handler using something similar to:
eventArgs.get_row()
Please feel free to contact me if you have any questions.
Hello,
I am just following up to see if you need any further assistance with this issue. If so please let me know.
Hi,
You can also refer to the following resources that review Manual CRUD scenarios with the WebDataGrid:
http://ko.infragistics.com/community/blogs/developer_support/archive/2012/02/03/webdatagrid-manual-crud.aspxhttps://www.youtube.com/watch?v=VxGoBSTvG7c
Here are two sample about your requirements exactly:
http://ko.infragistics.com/samples/aspnet/data-grid/delete-rows-basic-features
and
http://ko.infragistics.com/samples/aspnet/data-grid/add-new-row-basic-features.
am trying to do Manual crud operations.
Am able to edit the data in the grid. but not able to enter a new row or not able to delete an existing row.
It brings back with the existing data through the following method
I want to delete a row and and a new row to the existing web data grid using an object data source
Hi Shiva,
Thank you for posting in the Infragistics community !
I didn't understand what is your issue at all, so could you please provide a more detailed explanation ? You can try to answer my questions - what is your goal, do you try to achieve it with the code provided, what is the expected and actual result, etc.
Looking forward to hearing from you.