Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8325385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:25:13+00:00 2026-06-09T00:25:13+00:00

what is the code for updating and saving from grid view data directly in

  • 0

what is the code for updating and saving from grid view data directly in a web form.This is the code i have.Help me out for delete record and update record.

   protected void CancelRecord(object sender, GridViewCancelEditEventArgs e)
{
    gridRegistrationTableDetails.EditIndex = -1;
    BindData();
}
protected void EditRecord(object sender, GridViewEditEventArgs e)
{
    gridRegistrationTableDetails.EditIndex = e.NewEditIndex;
    BindData();
}
protected void UpdateRecord(object sender, GridViewUpdateEventArgs e)
{

}
protected void DeleteRecord(object sender, GridViewDeleteEventArgs e)
{}

i need to edit the four columns Emp name,Emp address,emp dept,emp mail.emp ID is the primary key.pls help me on this..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:25:14+00:00Added an answer on June 9, 2026 at 12:25 am

    If you are using database ,then create functions for Update and Delete
    Eg:
    Public void Update(DataClass dataclass){…}
    public void Delete(int Id){…}

    Write these following code in your apsx page

                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    </Columns>
    
                </asp:GridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    DataObjectTypeName="DataClass" DeleteMethod="Delete" 
                    TypeName="YourServiceClass" UpdateMethod="Update">
                    <DeleteParameters>
                        <asp:Parameter Name="id" Type="Int32" />
                    </DeleteParameters>
                </asp:ObjectDataSource>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my code. It is not updating the data in table. I cant
I've been creating this pretty large web application for sometime and have been updating
I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I have the simple JS code for updating text on button: <html> <head> <script
This code is only updating one row (the one that matches the first in
After updating to Parsec 3.1 from 2.x, code using many1, such as word =
I have a form that the user is going to interact with, by updating,
I have this if statement in my video show view: <% if @video.user ==
I'm updating code in an old Java application at work but I'm pretty new
I installed a windows service using installUtil.exe. After updating the code I used installUtil.exe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.