This is a migrated thread and some comments may be shown as answers.

[Solved] Bug with Batch Editing and Grouping

0 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Raymond
Top achievements
Rank 1
Raymond asked on 21 Jul 2011, 10:02 PM

I was hoping to use batch editing and the groupable / grouping functionality.

Can someone else (preferably, someone from Telerik?) verify that they can reproduce the following  bug?

Create a grid with batch editing. Have it groupable.
Then, perform grouping by dragging a column into the "group header"
After the ajax call to refresh the grid, some of the columns are no longer editable.
e.g. if I click on the cell, instead of being editable (with a textbox), the text just  blanks out and you can't change it.

however, if I do not do any grouping, then it works fine.
Here's a sample of my View.
Note - I'm also having some quirkiness with the group footers. Sometimes it doesn't show.

 

 

 

 

<% Html.Telerik().Grid(this.Model.ProgressPayItemDtos)
        .Name("Grid")
        .DataKeys(keys =>
        {
            keys.Add(p => p.ProgressPayId);
        })
        .ToolBar(commands =>
        {
            commands.SubmitChanges();
        })
        .DataBinding(dataBinding =>
            dataBinding.Ajax()
                .Select("_SelectBatchEditing", "ProgressPay")
                .Update("_SaveBatchEditing", "ProgressPay"))  
        .Editable(editing => editing.Mode(GridEditMode.InCell))
        .Columns(columns =>
        {
            // columns.Bound(obj => obj.Id).Width(1);
            columns.Bound(obj => obj.ProgressPayId).Title("Item").Width(80).ReadOnly();
            columns.Bound(obj => obj.PaymentQuantity).Title("Quantity").Width(80)
                    .HtmlAttributes(new { style = "text-align:right; border: 1px solid #CCC; background-color: #FDFFA6" })
                    .Aggregate(aggregates => aggregates.Sum())                   
                    .GroupFooterTemplate(group => { %><%= group.Sum %><% })
                    .FooterTemplate(footer => { %><%= footer.Sum == null ? null : footer %><%});
                                                        
            columns.Bound(obj => obj.PaymentAmount).Title("Amount").Width(80)
                    .Format(ProgressPaymentConstants.CurrencyFormat)
                    .HtmlAttributes(new { style = "text-align:right; border: 1px solid #CCC; background-color: #FDFFA6" })
                    .Aggregate(aggregates => aggregates.Sum())
                    .GroupFooterTemplate(group => { %><%= group.Sum.Format(ProgressPaymentConstants.CurrencyFormat) %><% })
                    .FooterTemplate(footer => { %><%= footer.Sum == null ?
                                                     null : footer.Sum.Format(ProgressPaymentConstants.CurrencyFormat)
                                                     %><%});           
        })
        .Scrollable(c => c.Height("500px"))
        .Groupable()
        .Render();
%>
Tags
Grid
Asked by
Raymond
Top achievements
Rank 1
Share this question
or