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

Paging in Grid

4 Answers 244 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 08 Oct 2012, 06:44 AM
Hi,

I am using kendo grid with paging.In my grid i have checkbox for selecting the grid row.
when i am using paging when I select a row in page 1 and after if go to page 3 and select a row and save the data to database.
The problem is when I select the page 3 row the page 1 row which is selected is not saved.
Even if I change the grid page to 1 the selected row is deselected automatically.
Is there any solution to solve the problem.

please help...

Regards,
Sam.

4 Answers, 1 is accepted

Sort by
0
OnaBai
Top achievements
Rank 2
answered on 08 Oct 2012, 10:16 PM
Most likely you are not saving the selection and therefore loosing the value when you navigate between results.
I explain some tips and tricks about checkboxes in my blog entry (http://wp.me/p2cl1j-eb) and specifically problems related to click checkboxes while not in editing mode. I hope this help otherwise let me know.
0
Sameer
Top achievements
Rank 1
answered on 09 Oct 2012, 05:34 AM
Hi,

Thanks for your reply.

I had gone through the blog.Actually my problem is just i am having checkboxes i.e not maintained in the database.
The best example which i need is given in this link(http://jsfiddle.net/jkTU4/109/)

I have tried it out but it is not working in my local system. I need after selecting data in different pages I am having a save button and i have to save the data in the database for the rows which are checked.
The check box is used only for selection but not saving data.
I need to save the selection in the grid. Please help me

Regards,
Sam.
0
OnaBai
Top achievements
Rank 2
answered on 09 Oct 2012, 06:48 AM
Hi Sam,

Are you saving the selected boxes?
In the fiddle that you mention there is code to detect clicks on the checkbox and then save not loosing during pagination. Do you have something similar? The question is that the checkbox is not part of your model and then you need to bound events (click, change, dataBound,...) to manage it.
0
Sameer
Top achievements
Rank 1
answered on 09 Oct 2012, 12:21 PM
HI,

Thanks for your help.

I am not saving the selected check boxes. I have attached an example in which the functionality is written as of in the fiddle example but i am not able to get the pagination.

Please go through the example and help me to save the data which is selected in different pages when clicked on SAVE button.
regards,
Sam.
Tags
Grid
Asked by
Sameer
Top achievements
Rank 1
Answers by
OnaBai
Top achievements
Rank 2
Sameer
Top achievements
Rank 1
Share this question
or