Issues with Custom Control to link CustomTable to a PageType field and VersionHistory

Aasim Khan asked on October 7, 2015 12:11

Hi All,

1) I have created a custom control that contains a CustomTableForm Control, a CustomTableDataSource, and a UniGrid and an Add button and a HiddenField.

I use it as a form control in my custom page type.

Now the working of the control is explained below.

In the form of creating a new page type, the user sees an empty grid alongwith the CustomTableForm duly attached to the CustomTable and displaying all the fields of the customtable. The user fills in the form and Clicks on Add, the record present in the form is inserted into the respective CustomTable and its ItemGUID is saved in the HiddenField and all the records in the customtable with the ItemGUID's in the hiddenField is bound to the UniGrid using the CustomTableDataSource. The process, if repeated adds the ItemGUID's to the HiddenField separated by vertical separator i.e. "|". E.g itemGUID1|itemGUID2|itemGUID3 This value is the overriden to he FormControl's "Value" which ultimately saves the GUID's in the Page Type's field to which the customControl is attached to. Now the issues I am facing with this control is in the Version History. The ItemGUID's are being displayed in the version history instead of the CustomTable Items which infact isn't happening with Kentico's Attachment Control.

2) I also have a dropdown with Values as GUID's and DisplayField as the Names of the fields. When I save it to the page type the ItemGUID's are saved to the field. In the Version History the ItemGUID's are displayed and is hence not in a readable format and not user friendly.

I am running four different websites sharing the same Kentico Instance.

Can I make some amendments anywhere so that the versionHistory shows the names/CustomTable Items instead of the respective ItemGUID's.

Any help in this regard would be great.

3) Now I have a Dropdown(lets say it DropDown-B) in the CustomTable which is displayed on the form of the PageType using the CustomControl. I have another DropDown in the PageType (lets say it Dropdown-A). I need to display records in DropDown-B based on the DropDown-A's selected value. Generally if there were two dropdowns in the page type, I could have easily used the First Dropdowns value in second DropDown as a Macro. But since my Dropdown-B is in the customControl or in simpler terms, another CustomTable (but displayed in the same page type), I am unable to access Dropdown-A' value anywhere in DropDown-B. Could you provide me steps to create any linkage between the two.

It would be great if someone could help me with these issues as I'm stuck badly.

Regards, Aasim

   Please, sign in to be able to submit a new answer.