Home Forums WinForms controls Xceed Grid for WinForms Data disappeared on unbounded columns within a databounded grid Reply To: Data disappeared on unbounded columns within a databounded grid

User (Old forums)
Member
Post count: 23064

If you supply the ProductName only when adding rows, you can use the AddingDataRow event on the GridControl, and get the ProductName from the Product table in the event handler for the specific ProductID, so that this is done only once.

If the data can be edited by the user so that the ProductID can be change on a specific row, you can also subscribe to the ValueChanged event of the ProductID cell, and update the ProductName only when the ProductID is changed.  You can subscribe to the event through the DataRowTemplate (e.g. DataRowTemplate.Cells[ “ProductID ” ] .ValueChanged).

 

Imported from legacy forums. Posted by André (had 1477 views)