i want the coding for People can view the item which was added by them in the list..... [i need to add item in custom splist but that was not able to view by anyone...likewise people who are adding item in the same list which was not able to view by others(i gave permission to view my Splist for the user).]
If I understood you correctly you need to set up Item-level Permissions.
Go to list settings -> advanced settings and set Item-level Permissions Read: Read items that were created by the user .
Edit after Ksesh comment:
Also set Create and Edit access to : Create items and edit items that were created by the user
Edit programmatically in shortcut:
|show 1 more comment|
This can be done without any line of code also i.e. Item-level Permissions in order to do that
in short you need to put filter on public view for condition "Created By "Is equal To" TYPE([Me])"