Search code examples
sharepointsharepoint-2010ribbon

SPListItem acts as Folder


var item = SPContext.Current.List.Items.Add();
item["ContentTypeId"] = SelectedCurrentType.Id;
item["SomeField"] = ...
//make some fields changes
item.Update();

But when i created this item i get a folder with all fields. in list view there is no

<a onfocus="OnLink(this)" href="/.../Lists/.../AllItems.aspx?RootFolder=%2F..%2FLists%2F..%2F..&amp;FolderCTID=0x0100CBE0798399&amp;View={D1DDC726-FC9C-40D3-A07B-5EAFE2286C66}" onclick="                javascript:EnterFolder(&quot;/.../Lists/.../AllItems.aspx?RootFolder=&quot; + escapeProperly(&quot;/.../Lists/.../...&quot;) + '&amp;FolderCTID=0x0100CBE079839FA443AB3C64E9BA763E776AC0FD9&amp;View={D1DDC726-FC9C-40D3-A07B-5EAFE2286C66}');return false;">Test</a>

and on the ribbon in section Actions i've got a button "Open"
what's wrong? how can i fix this?


Solution

  • the answer is

    <SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server"/>
    

    actually don't know why, but this control makes custom form weird. So the solution is remove this control from custom new form