Nothing helps. Below done in Asset Detail UI element
I did (inherit) for Object type and (automatic) for Parent object type.
Binding object type - class to be in uniselector. Same class for 2b and 2b.a (object type set in 2b so inherit in 2b.a, this object type different from module object type)
Target object type - Edited object class(same object type as set in Module)
Where condition ParentID == {% ToInt(UIContext.ParentObjectID) %} in 2b. Works fine . Referred Parent-child relationship kentico document. They did not said ParentID(in my case) to be a primary key column.
Tried ParentID == {% ToInt(UIContext.ParentObjectID) %} and ParentID = {% UIContext.ObjectID %} in 2b.a. Not worked but you said it to be primarykey(ParentID is not)
*ParentID is a column in AssetDetail table but its not primary key. It has relation to the primary key of the Asset table.
I had the extender applied. To be more clear
- When I visit the module in CMS Administration, I have a new button(handled by 1 in module UI structure above) + list(unigrid) of module object type.
- When I click edit action in above unigid I go into General vertical tab(handled by 2a in module UI structure above). Here I am in edit mode.
- When I click Asset vertical tab(handled by 2b in module UI structure above) I see a button. I am not sure whether I am in edit mode still.
- When I click above button(handled by 2b.a in module UI structure above), Still same error in modal dialog.
When I searched the "No object type selected" in Kentico Solution. I found below in CMS.resx
<data name="ui.editing.noobjecttype" xml:space="preserve">
<value>No object type selected.</value>
</data>
When I searched "ui.editing.noobjecttype" in Kentico Solution. I found below in CMSModules\AdminControls\Controls\UIControls\BindingEditItem.ascx.cs
protected override void OnInit(EventArgs e)
{
editElem.ContextResolver.SetNamedSourceData("UIContext", UIContext);
base.OnInit(e);
if (UIContext.EditedObject == null)
{
ShowError(GetString("ui.editing.noobjecttype"));
StopProcessing = true;
}
}
If I can resolve with your help, I can proceed this way. Alternatively, I used a aspx page with checkbox list to show AssetDetail data in modal dialog. I achieved the functionality but the UI is not like kentico that's why I am still pushing the module way.