i have two Ultragridview(Ultragridview1,Ultragridview2)
ultragridview1 data load database
after i insert 3 column (3 column no in database) and i import values for column new insert in ultragridview1
i want copy all data of Ultragridview1 to Ultragridview2 include 3 column new insert(value)
this is code of i:Ultragridview1.DataSource=Ultragridview2.DataSource but it no view 3 column new insert and value import in 3 column.
you help me?thank
If you want to copy over all the data from *unbound* columns to another grid, you would first have to add those unbound columns to the other grid, then loop through all the rows in the grid and copy them over. Since they're bound to the same data source, you can just do a straight loop:
for(int i=0; i < grid1.Rows.Count; i++)
{
UltraGridRow row = grid1.Rows[i];
UltraGridRow row2 = grid2.Rows[i];
row2.Cells["Unbound Column 1"].Value = row1.Cells["Unbound Column 2"].Value
// Same thing for other unbound columns
}
-Matt
i want copy all data grid1 (column and value new insert,column and value no in database) to grid2
row2.Cells["column_name1"].Value = row1.Cells["column_name1"].Value ?
i have image but i not Post