PDA

View Full Version : how to display a new datagrid


vinosha83
10-02-2007, 07:27 AM
hi i can display the empty datagrid and can be add,delete and update the data..
the problem is when i clikc the add button it will display all the data frm the database..
i just want to display the add data only...
so i knew that i hv to do temp table..at here i hv to save add data into tem table and then whn click
the save button then on;ly data frm tem table will be save into original table and then delete the data frm temp file


hw to copy the data from temp table into orginal table and then delete the data in the temp table

please help me is really urgent

chump2877
10-03-2007, 02:04 AM
how about binding the DataGrid to a null value to clear the DataGrid data:


GridView1.DataSource = null;
GridView1.DataBind();


..then (to add new data to the now empty DataGrid) dynamically create a new DataTable/DataView in your DataSet, add new values to the DataView, bind the DataGrid to the DataView, and update the DataTable contents to a new table in your database...

vinosha83
10-04-2007, 02:09 AM
hi i olredy display the empty datagrid and can be add,delete and update the data..
the problem is when i clikc the add button it will display all the data frm tha database..
i just want to display the add data only...
so like u mention i hv to do temp data..at here i hv to save add data into tem table and then whn click
the save button then on;ly data frm tem table will be save into original table and then delete the data frm temp file


hw to copy the data from temp table into orginal table and then delete the data in the temp table

please help me is really urgent

vinosha83
10-04-2007, 04:57 AM
problm solve