![]() |
| ||
| Problem with DataGrid I have 2 datagrid, 1 with details of Category and the other with the products user selected from the other datagrid, what Im saying is I have a select command on my 1st datagrid so when I select something from my 1st datagrid it should be added to the 2nd datagrid and that is workin but the problem is everytime I select somethin from the 1st datagrid adding to the 2nd datagrid it overwrites the existing record on the 2nd datagrid instead of adding on top of... can anyone help me please here the code to add what is from the 1st grid to the second one imgItems.ImageUrl = "Pictures/" + dgItems.SelectedItem.Cells[2].Text; Thanx in advance |
| ||
| Re: Problem with DataGrid Hi... The code you are following does overwrites the Grid. What you can do is - Copy the data getting from the dsDetails.Table[0] into the DataTable - Copy that Datatable into the session - and then merge that datatable coming from dsDetails.Table[0] with the session Datatable everytime - then Bind the Datatable from the session into dgDetails |
| ||
| Re: Problem with DataGrid That could be the problem, but then can you provide me with the code similar to that, coz Im clueless what ur talking about Thanx hey |
| ||
| Re: Problem with DataGrid You might want to put the datasource of datagridview2 into a viewstate and read it back after Page.IsPostBack. That aint hard to manage.... ' general declarations After the ispostback is checked you can add records to the dtMemory datatable for each field the user has selected..... |
| All times are GMT -4. The time now is 8:51 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC