Batch Editing issues with empty rows

6 posts, 0 answers
  1. Roni
    Roni avatar
    3 posts
    Member since:
    Oct 2010

    Posted 26 May 2015 Link to this post

    Hi,

    Using the RadGrid in Batch Editing mode and the EditType is set to row. The following (miss-) behaviour may also be reproduced on the demo page (http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx):

    • change some values in an existing row
    • click on "Add new record" to insert a new row
    • click on "Delete" on the newly inserted row (without inserting any data)
    • now try to save the changes => the "Save changes" button doesn't work anymore

    May be it has something to do with the combo box in the grid. In another grid without a combobox I have a slightly different behaviour. The "Save changes" is working but it also tries to save the deleted (empty) row.

    I also tried to save from the client side with javascript. In the first scenario the hasChanges() function gets an error:

    var hasChanges = grid.get_batchEditingManager().hasChanges(grid.get_masterTableView());

    Regards
    Roni

     

  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1102 posts

    Posted 29 May 2015 Link to this post

    Hi Roni,

    I tried replicating the problem in the online demo following the listed steps but was unable to do so as you can see from this video. Am I missing something? Can you please send us a video that illustrates the issue?

    Regards,
    Angel Petrov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Roni
    Roni avatar
    3 posts
    Member since:
    Oct 2010

    Posted 29 May 2015 in reply to Angel Petrov Link to this post

    Hi Angel,

    Thanks for your answer. I think you didn't reproduce the steps exactly:

    • change Edit Type of the grid to "Row"
    • change some values in an existing row
    • click on "Add new record" to insert a new row and don't insert any values in the new row
    • click on "Delete" on the newly inserted row (without inserting any data)
    • now try to save the changes => the "Save changes" button doesn't work anymore

    Please try it once again.

    Regards,
    Roni

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 02 Jun 2015 Link to this post

    Hello Roni,

    I have tested the described scenario with our latest version and everything seems to work as expected. Following is the example that I have tested:
    <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" OnBatchEditCommand="RadGrid1_BatchEditCommand">
        <MasterTableView EditMode="Batch" CommandItemDisplay="Top">
            <BatchEditingSettings EditType="Row" />
            <Columns>
                <telerik:GridClientDeleteColumn></telerik:GridClientDeleteColumn>
            </Columns>
        </MasterTableView>         
    </telerik:RadGrid>

    And the code-behind:
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID", typeof(int));
        table.Columns.Add("FirstName", typeof(string));
        table.Columns.Add("LastName", typeof(string));
        table.Columns.Add("Age", typeof(int));
        table.Columns.Add("Date", typeof(DateTime));
        table.Columns.Add("BoolValue", typeof(Boolean));
        for (int i = 0; i < 5; i++)
        {
            table.Rows.Add(i, "FirstName", "LastName", 20, DateTime.Now.AddDays(i), i % 2 == 0);
        }
     
        (sender as RadGrid).DataSource = table;
    }
    protected void RadGrid1_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
     
    }

    If you are using older versions of the controls, please upgrade to our latest version and see if the issue will be resolved on your side too.



    Regards,
    Konstantin Dikov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Roni
    Roni avatar
    3 posts
    Member since:
    Oct 2010

    Posted 02 Jun 2015 in reply to Konstantin Dikov Link to this post

    Hi,

    May be on your demo site there isn't the latest version installed?

    I tried again and created a video of the scenario.

    Regards,
    Roni

     

     

  6. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 05 Jun 2015 Link to this post

    Hello Roni,

    I have missed the part where you are referring to our online demo in your initial post. Now, after testing the exact steps from your description I was able to replicate the problem. However, the behavior is due to the RequiredFieldValidator controls in the new row and the fact that although that you are deleting the row, since there is only one editor generated for the entire column, that editor will still exist on the page and when there is a validator with failed validation, no postback will occur.

    Currently I am not able to confirm if this is a bug or a limitation, but I will forward the scenario to our developers team, so the could further investigate it.

    For bringing the issue to our attention you will find your Telerik Points updated.

    Please excuse us for any inconvenience caused by this.


    Regards,
    Konstantin Dikov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top