Click here to Skip to main content
15,887,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the check box to save the data.I have passed that data to the model.And I didn't know how to retrieve the saved data in the same view.
Posted
Comments
[no name] 15-Oct-14 11:48am    
Please post your code. But still you can refer the solution in the solution.
Member 11155347 16-Oct-14 0:26am    
http://screencast.com/t/vWTdqTB9RHx

Refer the above Screenshot.

My scenario is, im using the listbox to display all users, when i select the users, check the permissions and click the save button the roles saved and updated properly. What i need is when im selecting the users from the listbox i need to display the permissions Checked.
[no name] 16-Oct-14 2:38am    
Ok so you want on select of suppose Dhana(as per screenshot), the checkbox to be checked??like suppose Addlesson and Edit Lesson!!
Member 11155347 16-Oct-14 3:42am    
Exactly.
Member 11155347 16-Oct-14 3:48am    
i need to do it dynamically.

1 solution

Access Model Data from Controller in View Using Razor[^]

Please check here. This is just a tutorial to give some idea regarding the accessing data using Razor. Please post your code. Or what you want to show the data like in grid or editor or in a textbox.
Please post back your comments if you have any queries.
Thanks
:)
According to your need, what you need to do is,
Get the ID of the Name that is being clicked or the row(as you have used list) and onclick of the name make an ajax call to the server to get the To Be checked values for that user and on success of the ajax make the check box with that name to be active/checked. I hope you got an idea how to do !!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900