4 retagged the post, fixed some typos.
source | link

We've created a custom New Item page for our list on our site in Sharepoint 2010 with this code:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table id="tblForm" cellpadding="0" cellspacing="0" >
        <SharePoint:ListFieldIterator ID="lfiARPieces" runat="server" ControlMode="New" />
        <tr>
            <td align="right">
                <SharePoint:SaveButton ID="btnSave" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
New ARPiece
</asp:Content>

We want to show a ribbon that is normally dispalyeddisplayed on New Item page and access buttons, for example a Save button to bind some action to it (we actually want the default action to fire - just to save the item, but without the context the saveSave button will probably not know what to save). We managed to show the ribbon:

protected override void OnPreRender(EventArgs e)
        {
            SPRibbon current = SPRibbon.GetCurrent(this);
            if (current != null)
            {
                //
                current.Enabled = true;
                current.Minimized = false;
                current.CommandUIVisible = true;
                current.MakeTabAvailable("Ribbon.ListForm.Edit");
                current.InitialTabId = "Ribbon.ListForm.Edit";
                current.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit.Commit", string.Empty);      
}
}

What should we do to bind the actions?

We've created a custom New Item page for our list on our site in Sharepoint 2010 with this code:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table id="tblForm" cellpadding="0" cellspacing="0" >
        <SharePoint:ListFieldIterator ID="lfiARPieces" runat="server" ControlMode="New" />
        <tr>
            <td align="right">
                <SharePoint:SaveButton ID="btnSave" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
New ARPiece
</asp:Content>

We want to show a ribbon that is normally dispalyed on New Item page and access buttons, for example Save button to bind some action to it (we actually want the default action to fire - just to save the item, but without the context the save button will probably not know what to save). We managed to show the ribbon:

protected override void OnPreRender(EventArgs e)
        {
            SPRibbon current = SPRibbon.GetCurrent(this);
            if (current != null)
            {
                //
                current.Enabled = true;
                current.Minimized = false;
                current.CommandUIVisible = true;
                current.MakeTabAvailable("Ribbon.ListForm.Edit");
                current.InitialTabId = "Ribbon.ListForm.Edit";
                current.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit.Commit", string.Empty);      
}
}

What should we do to bind the actions?

We've created a custom New Item page for our list on our site in Sharepoint 2010 with this code:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table id="tblForm" cellpadding="0" cellspacing="0" >
        <SharePoint:ListFieldIterator ID="lfiARPieces" runat="server" ControlMode="New" />
        <tr>
            <td align="right">
                <SharePoint:SaveButton ID="btnSave" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
New ARPiece
</asp:Content>

We want to show a ribbon that is normally displayed on New Item page and access buttons, for example a Save button to bind some action to it (we actually want the default action to fire - just to save the item, but without the context the Save button will probably not know what to save). We managed to show the ribbon:

protected override void OnPreRender(EventArgs e)
        {
            SPRibbon current = SPRibbon.GetCurrent(this);
            if (current != null)
            {
                //
                current.Enabled = true;
                current.Minimized = false;
                current.CommandUIVisible = true;
                current.MakeTabAvailable("Ribbon.ListForm.Edit");
                current.InitialTabId = "Ribbon.ListForm.Edit";
                current.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit.Commit", string.Empty);      
}
}

What should we do to bind the actions?

3 retagged the post
| link
2 added 104 characters in body; added 43 characters in body
source | link

We've created a custom New Item page for our list on our site in Sharepoint 2010 with this code:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table id="tblForm" cellpadding="0" cellspacing="0" >
        <SharePoint:ListFieldIterator ID="lfiARPieces" runat="server" ControlMode="New" />
        <tr>
            <td align="right">
                <SharePoint:SaveButton ID="btnSave" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
New ARPiece
</asp:Content>

We want to show a ribbon that is normally dispalyed on New Item page and access buttons, for example Save button to bind some action to it (we actually want the default action to fire - just to save the item, but without the context the save button will probably not know what to save). We managermanaged to show the ribbon:

protected override void OnPreRender(EventArgs e)
        {
            SPRibbon current = SPRibbon.GetCurrent(this);
            if (current != null)
            {
                //
                current.Enabled = true;
                current.Minimized = false;
                current.CommandUIVisible = true;
                current.MakeTabAvailable("Ribbon.ListForm.Edit");
                current.InitialTabId = "Ribbon.ListForm.Edit";
                current.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit.Commit", string.Empty);      
}
}

What should we do to bind the actions?

We've created a custom New Item page for our list on our site in Sharepoint 2010 with this code:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table id="tblForm" cellpadding="0" cellspacing="0" >
        <SharePoint:ListFieldIterator ID="lfiARPieces" runat="server" ControlMode="New" />
        <tr>
            <td align="right">
                <SharePoint:SaveButton ID="btnSave" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
New ARPiece
</asp:Content>

We want to show a ribbon that is normally dispalyed on New Item page and access buttons, for example Save button to bind some action to it. We manager to show the ribbon:

protected override void OnPreRender(EventArgs e)
        {
            SPRibbon current = SPRibbon.GetCurrent(this);
            if (current != null)
            {
                //
                current.Enabled = true;
                current.Minimized = false;
                current.CommandUIVisible = true;
                current.MakeTabAvailable("Ribbon.ListForm.Edit");
                current.InitialTabId = "Ribbon.ListForm.Edit";
                current.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit.Commit", string.Empty);      
}
}

What should we do to bind the actions?

We've created a custom New Item page for our list on our site in Sharepoint 2010 with this code:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table id="tblForm" cellpadding="0" cellspacing="0" >
        <SharePoint:ListFieldIterator ID="lfiARPieces" runat="server" ControlMode="New" />
        <tr>
            <td align="right">
                <SharePoint:SaveButton ID="btnSave" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
New ARPiece
</asp:Content>

We want to show a ribbon that is normally dispalyed on New Item page and access buttons, for example Save button to bind some action to it (we actually want the default action to fire - just to save the item, but without the context the save button will probably not know what to save). We managed to show the ribbon:

protected override void OnPreRender(EventArgs e)
        {
            SPRibbon current = SPRibbon.GetCurrent(this);
            if (current != null)
            {
                //
                current.Enabled = true;
                current.Minimized = false;
                current.CommandUIVisible = true;
                current.MakeTabAvailable("Ribbon.ListForm.Edit");
                current.InitialTabId = "Ribbon.ListForm.Edit";
                current.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit.Commit", string.Empty);      
}
}

What should we do to bind the actions?

1
source | link