Hi,
How can I map an unbound column to a bound column with additional logic? Here is what I am trying to do;
Actual Datatable column : Amount, PC
Display in grid : PC, Prepaid Amount, Collect Amount
If column PC data is set to P, then display Amount in the unbound Prepaid column and clear Collect column
If column PC data is set to C, then display Amount in the unbound Collect column and clear Prepaid column
When update in the grid, bound column Amount needed to be update from either 1 of them.
Thanks !
Hello,
What you could do in this case is to add the unbound columns in the InitializeLayout event of the Grid. Populate them in the InitializeRow event of the Grid accordingly to the value of the your first column, like: e.Row.Cells["Desired Column Key"].Value ...
When you are changing the values of the UltraGrid you could update your desired column accordingly by setting the new value of that column in the BeforeExitEdit mode, of BeforeCellUpdate events, and also to clear the value of the other column, the code snippet might look something like that;
if (e.Cell.Column.Key == "Desired Column Key" || e.Cell.Column.Key == "Desired second Column Key" )
{
//Do you logic
Hope this helps.
Sincerely,
Danko
Developer Support Engineer
Infragistics
www.infragistics.com/support