Hi Yoni,
You cannot have two columns with the same mapping name. But one way you can do this by adding an unbound column in a grid.
To do this, where you want the second column, add a GridBoundColumn with some unique mapping name, say "UProduct". (At this point, this will just display an empty column in that position in the grid.) To populate this column, add a grid.model.QueryCellInfo event handler. In the handler have code like this.
int colIndex = grid.Binder.NameToColIndex("UProduct");
if(colIndex == e.ColIndex && e.RowIndex > 0 && e.RowIndex < grid.Model.RowCount)
{
colIndex = grid.Binder.NameToColIndex("OrderID");
e.Style.CellValue = grid[e.RowIndex, colIndex].CellValue;
}
Please refer to the attached sample for implementation and let me know if this helps.
Unboundcolumn.zipThis should put th evalues from the real OrderID column into the "UProduct" column. In the code above the "&& e.RowIndex < grid.Model.RowCount" check is only needed if you have an AddNew row at the bottom of the grid.
Best regards,
Haneef