Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all

I have one table Employee Master ....which is bind in gridview

i want to insert new Employee through gridview..i can do edit,update & delete bt no idea about insert new record.....pls give reply with example as soon as possible
:confused:
Posted

You insert the row into the database, then you rebind to it, which populates the grid. You typically have a form for doing this, to accept the required values.
 
Share this answer
 
Gridview doesn't support insert by default. if you want to insert a new item you should use the detailsview or formview control.
However there is a work around:
Use footer rows with textbox fields(and other fields if required) to insert a row.
You will find a lot of articles on the web for the same.
Here is one of them:
Use GridView to insert new record[^]


Accept answer if it helps you...
 
Share this answer
 

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