: : : can somebody help me with the codes for deleting record in the
: : : datagrid..
: : : here's what i wanna do..
: : : once i click on the datagrid on the record so that the cursor is
: : : focus on it. then when i click the delete button that record is
: : : automatically deleted and my datagridview is refresh also..
: : :
: : : thanks alot..
: : :
: : :
: : :
: :
: :
: : You just need to following the process you want: add a delete button
: : and write the button event handler method, and inside the method,
: : you do the programming logic, first to identify the index of the
: : selected row and then get the record ID from that row and do the
: : record deletion logic by using ADO.NET and then reload the whole
: : data grid to do the refresh.
: :
: : :)
: :
: :
: : Brad Wang
: : .NET Freelancer from China
:
:
:
:
:
:
:
: thanks Brad to tell you frankly,, im new with c# and i still dont
: know a few codes yet.. can you give me a code for this? and also the
: update record because only the first column updates then if i update
: the other columns it doesnt update and says insert into error.
:
:
For insert into error, I think you're probably have problem with SQL statement, please check and make sure the syntax is right.
For datagrid, you can checkout this resource:
http://www.syncfusion.com/FAQ/windowsforms/faq_c44c.aspx which I think maybe very helpful to you.
Brad Wang
.NET Freelancer from China