Add New button centered, perform command insert on click

2 posts, 0 answers
  1. LJZIMMERMAN
    LJZIMMERMAN avatar
    5 posts
    Member since:
    Oct 2011

    Posted 29 Sep Link to this post

    I want to customize the add new button, centering it on the grid but also having the same functionality as the normal built in Add New button.

    Here is the code I have so far:

    <CommandItemSettings ShowAddNewRecordButton="False" />
    <CommandItemSettings ShowRefreshButton="false" />
    <CommandItemTemplate>
        <div id="divCenter" style="text-align: center">
        <asp:LinkButton ID="btnAddNew" Text="Add New" CommandName="Insert" runat="server"></asp:LinkButton>
    </div>
    </CommandItemTemplate>

    The problem is the Insert command only makes the screen flash and doesn't open the Add New dialog.

    Can you help?

  2. LJZIMMERMAN
    LJZIMMERMAN avatar
    5 posts
    Member since:
    Oct 2011

    Posted 29 Sep in reply to LJZIMMERMAN Link to this post

    I figured this one out. Rather than have the CommandName="Insert", it is required to be CommandName="InitInsert"
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top