Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8572161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:56:42+00:00 2026-06-11T18:56:42+00:00

What I am doing is copying rows from one grid to another. The origin

  • 0

What I am doing is copying rows from one grid to another. The origin grid is not editable, but the destination grid is.

So, when I load in a row and change it, it changes the values within the original grid as well.

Further more, if I add a row from the original grid to the destination grid twice, I get further issues. One data change on either of the rows within the destination grid changes the data within the other row on the destination table, as well as the ‘read-only’ version within the original grid.

I have a suspicion that this is caused by all copied rows retaining the data-uid of the parent from which it was copied. If someone could confirm/deny this and maybe give me a workaround, I’d be incredibly grateful!

Side note: Because of implementation requirements, all of this code MUST be client side, so I can’t do this work through controller methods. I did get it working this way, but it’s not good enough for what I need it to do.

Original Grid (Copying from):

@(Html.Kendo().Grid(Model)
.Name("ProductBookGrid")
.Columns(columns =>
{
    columns.Bound(i => i.FreightClass).Width(70);
    columns.Bound(i => i.Length).Width(70);
    columns.Bound(i => i.Width).Width(70);
    columns.Bound(i => i.Height).Width(70);
    columns.Bound(i => i.DimensionUOM).Width(70);
    columns.Bound(i => i.QuantityValue).Width(70);
    columns.Bound(i => i.QuantityUOM).Width(70);
    columns.Bound(i => i.WeightValue).Width(70);
    columns.Bound(i => i.WeightUOM).Width(70);
    columns.Bound(i => i.NMFC).Width(75);
    columns.Bound(i => i.Description).Width(150);
})
.ToolBar(toolbar =>
{
    toolbar.Custom().Text("Add").Url("#_").HtmlAttributes(new { onclick = "PopulateItemGrid()" });
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
.DataSource(dataSource => dataSource
    .Ajax()
    .Model(model =>
    {
        model.Id(i => i.ItemModelID);
    })
)
.Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple))

)

Copy function:

    function PopulateItemGrid() {
var productBookGrid = $("#ProductBookGrid").data("kendoGrid");
var itemGrid = $("#QuoteItemGrid").data("kendoGrid");

productBookGrid.select().each(function () {
    var dataItem = productBookGrid.dataItem($(this));
    itemGrid.dataSource.add(dataItem); 
});

$("#ProductBookMenu").data("kendoMenu").close("#Item1");

}

Destination Grid:

@(Html.Kendo().Grid(Model.ItemModelList)
.Name("QuoteItemGrid")
.Columns(columns =>
{
    columns.Bound(i => i.FreightClass)
        .EditorTemplateName("ItemGrid_RefFreightClassListing")
        .Width(50);
    columns.Bound(i => i.Length)
        .EditorTemplateName("ItemGrid_Length")
        .Width(30);
    columns.Bound(i => i.Width)
        .EditorTemplateName("ItemGrid_Width")
        .Width(30);
    columns.Bound(i => i.Height)
        .EditorTemplateName("ItemGrid_Height")
        .Width(30);
    columns.Bound(i => i.DimensionUOM)
        .EditorTemplateName("ItemGrid_RefUOMListingDimension")
        .Width(50);
    columns.Bound(i => i.QuantityValue)
        .EditorTemplateName("ItemGrid_QuantityValue")
        .Width(30);
    columns.Bound(i => i.QuantityUOM)
        .EditorTemplateName("ItemGrid_RefUnitTypeListing")
        .Width(50);
    columns.Bound(i => i.WeightValue)
        .EditorTemplateName("ItemGrid_WeightValue")
        .Width(30);
    columns.Bound(i => i.WeightUOM)
        .EditorTemplateName("ItemGrid_RefUOMListingWeight")
        .Width(50);
    columns.Bound(i => i.NMFC).Width(50);
    columns.Bound(i => i.Description).Width(100);
    columns.Bound(i => i.IsSaved).Width(20);
    columns.Command(command =>
    {
        command.Destroy();
    }).Width(60);
})
.ClientDetailTemplateId("ItemDetails")
.ToolBar(toolbar =>
{
    toolbar.Create();
    //toolbar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom))
.Pageable()
.Sortable()
.Scrollable()
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
    .Ajax()
    .Batch(true)
    .ServerOperation(false)
    .Events(events =>
    {
        events.Error("QuoteItemGrid_ErrorHandler");
    })
    .Model(model =>
    {
        model.Id(i => i.ItemModelID);
        model.Field(i => i.DimensionUOM).DefaultValue("in");
        model.Field(i => i.WeightUOM).DefaultValue("lbs");
    })
    .Create(create => create.Action("CreateProducts", "ItemGrid"))
    .Read(read => read.Action("GetProducts", "ItemGrid"))
    .Update(update => update.Action("UpdateProducts", "ItemGrid"))
    .Destroy(destroy => destroy.Action("DeleteProducts", "ItemGrid"))
)

)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:56:43+00:00Added an answer on June 11, 2026 at 6:56 pm

    You can use the toJSON method to get the raw data:

    var dataItem = productBookGrid.dataItem($(this));
    
    itemGrid.dataSource.add(dataItem.toJSON()); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am copying and pasting some IBOutlets from one view to another scrollview. But
I am copying some user data from one SqlServer to another. Call them Alpha
My question is! I am copying content from one table to another table and
If I start copying a huge file tree from one position to another or
I am doing a large archival of data from one DB to another DB
I am copying content from one table to another as follows; var ntr='',//to store
I found a method for copying ntfs permissions information from one existing folder to
Doing a simple Squeryl database lookup, but trying to exclude a value. I've tried:
I have a MySQL table from a third-party application that has millions of rows
I'm trying to implement the progress notification mechanism when copying files. I'm doing this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.