Hi
Thanks for your reply. I was actually hoping for a more detailed answer than that.
For example, lets say I want to edit the customers in the northwind database. I get a collection of Customer entities and bind the collection to a datagrid or a datalist. My datalsit is set up such that the item template contains textboxes for all the fields so that the user can edit all of the rows, a bit like an excel spreadsheet.
When the user clicks submit/edit, then what do i do?
How do i get the data from the datagrid back into the database using llblgen?
Could you give me an example in code?
This is how i imagine it will work in click event:
- retrieve the collection of customer entities from the database
- loop through each row in the datagrid and get the data
- with the primary key of the row in datagrid, find the customer entity in the collection and set its fields with the values from the datagrid
- save the collection using save all or somethng equivalent
Please culd you give me an example in code.
I am also wondering if i have to retrieve the customers collection again in the update button click event or whether it is still available to me somehow because i bound it to the datagrid. I am used to using data readers.
Thanks
andrea