I am new in ASP.Net Application. I have a page with some TextBoxes and GridView. I have Done the Values of Textboxes save into Invoice Table and i want to save Invoice Detail values through DataGridView, But the DataGridView behave readonly.
In Windows Application form i can write in DataGridView (As many Record) and click save Botton then textboxes value save in Invoice table & DataGrid Values save in Invoice Detail Table. using this
Expand|Select|Wrap|Line Numbers
- foreach (DataGridViewRow dr in dgview.Rows)
- {
- if (dr.Cells[1].Value != null)
- {
- CMS.Components.WEB.Invoice_Detail objd = new CMS.Components.WEB.Invoice_Detail();
- objd.Description = Convert.ToString(dr.Cells["Description"].Value);
- objd.Quantity = Convert.ToString(dr.Cells[2].Value);