How to implement add delete modify functionality in datagridview?
I am connecting datbase to datagridview & displaying on page. and now i want to implemant add delete & modify functionality in grid itself.
can anybody help...
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Bechir BejaouiRank #144 · 15.9K reputationPosted Jan 30, 2009, 10:53 AM EST
Remember Me15 reputationPosted Feb 1, 2009, 11:55 PM EST
means if i delete any row from grid same should happen with database...
right now i am implementing this by writing sql query with sqlcommand & sqlconnection string. but what i want to do is implement add delete in grid itself..
thnx,
Bechir BejaouiRank #144 · 15.9K reputationPosted Feb 12, 2009, 12:35 AM EST
you create a BindingSource object and configure it to your data source
then
yourcontrol.Databinding.add("thepropertyname like Text or DataSource ",
bindingsource_instance,
"The source like a given data table for example "
);
This provides a binding in two directions, if I well undersood the problem