Try our conversational search powered by Generative AI!

Custom Property Data Type

Vote:
 
Hi I am trying to write a custom property data type which has 2 drop down boxes. Both drop down boxes will only be visible in edit mode, in view mode the value will be used behind the scenes. One drop down box will contain a list of Companys and the other will contain a list of Products. If the user selects a Company i want the second drop down box to be filtered so that it only displays the Products for that company. I can live with storing the value as 2 colon seperated integers for CompanyID and Product ID. I can already create the drop downs and will try to use AJAX to do the filtering but how do i make episerver store the 2 values in the property? Thanks Ben Crinion
#12748
Aug 22, 2006 10:38
Vote:
 
Have you tried overriding the ParseValidation method in the custom property? This is usally how I get the value from a custom control to update the property value manually. You will need to add a validator to your control _customDropDown.Controls.Add(CreateParseValidator(_customDropDown)); Would be keen to know how you get on with the AJAX implementation as usually I would do this sort of thing in a pop-up dialog then return the values to a hidden input for EPiServer to save to the property. If you could email me on jerms55 at gmail, thanks.
#14827
Aug 22, 2006 13:11
Vote:
 
Just another note, I am in the process of writing an article on Advanced Property Development which will include doing a pop-up type property compared to an Ajax version using the Atlas framework. The example property will be a set of three dropdown lists that filter. The article will be coming in the next EPiServer TechNews (hopefully).
#14828
Aug 24, 2006 1:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.