Hello,
I have a scenario where I need to have cell text to display one databound field from an entity property, but when in edit mode I would like to use a dropdownlist to change the underlying entity itself and not the value being displayed.
For example my entity in simple terms is as follows:
Vehicle (Main databound entity)
-- Vehicle.Make (relates to Make entity)
-- Vehicle.Model (relates to Make entity)
-- Vehicle.Year (relates to Year entity)
-- Vehicle.Region (relates to Region entity)
Make
-- Make.MakeID
-- Make.MakeName
Model
-- Model.ModelID
-- Model.ModelName
Year
-- Year.YearID
Region
-- RegionID
-- RegionAbbr
-- RegionFullName
I would like to have for example a Region column that displays Region.RegionAbbr in the cell text, but when entering edit mode give a list bound to Region enities. These entries should be bound to a List<Region> and displaymember should be set to RegionAbbr for display purposes. When an entity is selected from the dropdown, instead of altering Region.RegionAbbr I would like to intercept the change and assign the Dropdownlist DataBoundItem to the Vehicle.Region entity.
Can this be done?
I have a scenario where I need to have cell text to display one databound field from an entity property, but when in edit mode I would like to use a dropdownlist to change the underlying entity itself and not the value being displayed.
For example my entity in simple terms is as follows:
Vehicle (Main databound entity)
-- Vehicle.Make (relates to Make entity)
-- Vehicle.Model (relates to Make entity)
-- Vehicle.Year (relates to Year entity)
-- Vehicle.Region (relates to Region entity)
Make
-- Make.MakeID
-- Make.MakeName
Model
-- Model.ModelID
-- Model.ModelName
Year
-- Year.YearID
Region
-- RegionID
-- RegionAbbr
-- RegionFullName
I would like to have for example a Region column that displays Region.RegionAbbr in the cell text, but when entering edit mode give a list bound to Region enities. These entries should be bound to a List<Region> and displaymember should be set to RegionAbbr for display purposes. When an entity is selected from the dropdown, instead of altering Region.RegionAbbr I would like to intercept the change and assign the Dropdownlist DataBoundItem to the Vehicle.Region entity.
Can this be done?