Display NewRowPosition Button When Adding New Rows

3 posts, 1 answers
  1. Thanos
    Thanos avatar
    5 posts
    Member since:
    Aug 2016

    Posted 17 Aug Link to this post

    Hello,

    When I have NewRowPosition set to Bottom, I see the "Click here to add new item" button at the bottom of the GridView, as expected.

    My issue is that when I click the NewRow button, the button disappears as I am adding the new row. Note that this only happens when adding a new row - when editing an existing row, the NewRow button appears as expected.

    Is there a way to always have the NewRow button shown when adding new rows?

     

    Thanks,

    -Thanos

  2. Answer
    Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    277 posts

    Posted 18 Aug Link to this post

    Hello Thanos,

    You can subscribe to the AddingNewDataItem event of RadGridView and call the CommitEdit and BeginEdit commands consequently through a Dispatcher:

    private void clubsGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
            {
                Dispatcher.BeginInvoke(DispatcherPriority.Background,(Action)(() =>
                {
                    this.clubsGrid.CommitEdit();
                    this.clubsGrid.BeginEdit();
                }));
            }

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Thanos
    Thanos avatar
    5 posts
    Member since:
    Aug 2016

    Posted 24 Aug in reply to Stefan Nenchev Link to this post

    Hey Stephan,

    That worked great. Thanks.

    Take care,

    -Thanos

Back to Top