Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hey every one.
here is my question:
i want to use my DataAccess class to give data source to Grid View. and use functions in that class to update, delete data in database.
plz help me.....
Thanks
Bilal Hassan
Posted

Gridview just need the Datasource, that's all. So pass the Dataset or DataTable or something to GridView
GridView.DataSource = dDataSource;//Assign the Datasource here

GridView.Databind();


EDIT
----------------------------

Insert,Update and Delete Using Grid View[^]
Insert Update Edit Delete record in GridView[^]
 
Share this answer
 
v2
Comments
bilal _hassan 29-May-11 11:52am    
Thanks.. and what i will do for update and delete cmd??
thatraja 29-May-11 11:56am    
Check my updated answer
RaviRanjanKr 29-May-11 12:09pm    
Nice Answer, My 5 :)
Espen Harlinn 29-May-11 14:32pm    
Fair enough, my 5
[no name] 30-May-11 5:53am    
good one!
In addition to Raja soultion I am also suggesting you to navigate given link to get full steps for Insert,Update and Delete data in Gridview
Edit,Update,Delete in Gridview[^]
 
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