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

Passing IDs between grids & row selection count

1 Answer 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 24 Dec 2013, 10:35 AM
I've used JavaScript to initialise a grid. Please have a look at this JSBin which illustrates what I have at the moment. The grid has been built based on this example in the Code Library, which allows grid rows to be selected using checkboxes.

I'm looking for a way to pass selected row IDs from one grid to another almost identical grid in a separate MVC view. Each time the desired rows have been selected followed by pressing the 'Show selected IDs' button, the IDs of the selected rows are to be sent to another view containing a grid of Products with a few additional columns. How can I send those IDs back to a controller and display the corresponding rows in the second grid?

For the second part of my question, I want to have a field called ViewCount that keeps count of the number of times a row has been selected. Based on the previously mentioned action of selecting rows and clicking a button, I want to then increase the ViewCount by 1. Is it possible and how can I go about doing that?

My thinking is that both events could be bound to the following function:
$("#showSelection").bind("click", function () {
        var checked = [];
        for(var i in checkedIds){
            if(checkedIds[i]){
                checked.push(i);
            }
        }
        //Code goes here
    });
});
Any help would be much appreciated. Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 26 Dec 2013, 09:09 AM
Hi J,

I already answered to this query in duplicated support ticket created by you - #770985 . Please keep in mind that it is highly recommended that you keep related questions in one support thread or a forum post, so that we can easily keep track of your support history and provide better answers in a shorter time.

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
JJ
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or