How to Edit & update & Delete a particular row of Gridview with code in c# & without using SQLDataSource

Hi Everyone

          i have to take a gridview and to do the following operation

             1)Insert new row in gridview by click on Add New Button in gridview

           2)Edit that new row

           3)Update that new row

          4)Delete That new row

how to write code for this.plz help

thanks & regards



3/18/2008 9:27:44 AM 72751 articles. 3 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 21

Use a grid view to show data. And create a panel of textboxes and button.

Create a database tables & stored procedures. Then save data to database with stored procedure. After that show datat in grid view & in gridview use edit & delete buttons. 


If this post was useful to you, please mark it as answer. Thank you!

.NET Web Developer
3/18/2008 9:43:36 AM

Hi rakesh.shrivastava ,

This article explain how to do this.


Samu Zhang
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
3/24/2008 9:10:30 AM

Similar Artilces:

Edit, save & update using views & presenters
In my project we are using the MVP pattern. I am new for this. i am handling a task, i need to use them using domain objects. i need to finish that using DAO's, Views & presenters and so on. Now my task is in my form there are some list boxes , check boxes, text fields. i need to edit, save and update the data. tables are ready. i created domain objects and data interfaces. i stuck with the presenters and views. please any one help me in giving some code samples to finish my task. I thank you in advance DnetD( Dotnet Developer)    What exactly are you asking? ASP.NET M...

AccessDataSource & GridView & DetailsView: Delete & Insert work, Update does not.
 My web page, shown below, has this problem: I can Insert & Delete records, but Update does not change the database, and no error is reported. The [Created] field is a DateTime value, that receives the current date & time as the default value when a record is added to the table, as expected. Please advise.1 <%@ Page Language="VB" 2 AutoEventWireup="false" CodeFile="default.aspx.vb" Inherits="email" 3 title="Email" %> 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 5 ""> ...

&& In Generated Javascript Becomes &amp;&amp;
I am trying to write client side scripts in c#, V 1.4. The && operator is generated in the javascript as &amp;amp;, which causes errors.  How can I avoid this? (Code below)  Thanks in advance.   script = "<script language='javascript' type='text/javascript'>\n"; script += "if (Form1." + tbxA.ClientID + ".value == '' && "; script += "Form1." + tbxB.ClientID + ".value == '') {"; script += "Form1." + cbxC.ClientID + ".Checked = false;}"; ...

insert,update & delete problem for oracle db from vs.net2005 using c# & object data source
how i can refer to the varchar2 data type from 2005? how i can update, insert & delete the database ENTRY? How i can oracle stored procedure from vs.net2005?how can i pass parameters?   Hi, --> You have to use String datatype in C# to compatble with ORacle varchar2 type. --> You should have to write a stored proc for each operation then call from C# with appropriate parameters or generate insert/update/delete       statement then execute through the ExacuteNonQuery method of ASP.NET.. --> The following links will help you out how...

GridView & OnRowUpdating & no control in a proper row
I have the following ASPX:<asp:GridView ID="ctlAllocations" runat="server" OnRowDeleting="ctlAllocations_OnRowDeleting" OnRowCommand="ctlAllocations_OnRowCommand" OnRowCancelingEdit="ctlAllocations_OnRowCancelingEdit" OnRowEditing="ctlAllocations_OnRowEditing" OnRowUpdating="ctlAllocations_OnRowUpdating" OnRowUpdated="ctlAllocations_OnRowUpdated" OnRowDataBound="ctlAllocations_OnRowDataBound" > <Columns> <asp:TemplateField HeaderText="GL Account" HeaderStyle-Horizontal...

&amp; instead of &
I have gridview with the following code on row commandDim row As GridViewRow = gvBusinessLines.Rows(e.CommandArgument)txtBusinessLine.Text = CStr(row.Cells(1).Text) ''''''''''''''''''''''''''''''''''''''''''''''' When I have this text in gridview for example:"test & test2", when clicking on the button of the gridview, textbox is containing test &amp; test2How to avoide this other than re...

Replacement of & , &amp;
I was trying this java script inside a mozilla extension but the browser shows me error this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); XML Parsing Error: not well-formed at replace(/&/g,'&amp;') Any thoughts ? Thanks On Fri, 30 May 2008 10:26:19 -0700 (PDT), sb wrote: > I was trying this java script inside a mozilla extension but the > browser shows me error > this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); > ...

Convert &amp; to &
I have a Gridview that is populated by the 3 different users from selections made in a prior Form.  This gridview summarizes everything.  I then step through this Gridview and write the data to a history file on SQL. The problem I am having is, one column in this Gridview is a name column which contains the "&" symbol.  When I iterate the Gridview and populate the history file the & becomes &amp;.  I can't seem to figure out how to convert this properly.  Both data fields are nvarchar type.  Please help anyone. This is the code to tak...

If & =&amp; in xml then { or }= what?
Hi frnds, some problem when using xml & is not compatible in xml file so we replace & with &amp;    like that i want to know what the characters which are not compatible with xml syntax for example when i m using { or } in xml file then its shwoing error msg. if anyone knows the soln then plz reply me. Thanks in advance.Regards,Hasan Mohiuddin Hi Dear,Please find the Table. It contains the all special character list... quot " U+0022 (34) HTML 2.0 HTMLspecial ISOnum quotation mark (= APL quote) amp &am...

& where shown as &amp;
hai,     At runtime i will add values from textbox to datagrid using datatables.what my problem was , when i add as he & she in textbox it show as he &amps; she in the to solve this. Thanks in advance   cool.mugil:    At runtime i will add values from textbox to datagrid using datatables.what my problem was , when i add as he & she in textbox it show as he &amps; she in the to solve this.  Make sure you are not HTML encoding the input values.  Hai,    How to do stop html enc...

&, &&, and backtracking.
------=_Part_20601_33098141.1189046184291 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline How do C<&> and C<&&> differ with respect to backtracking? For instance, "foobar" ~~ / <[a..z]>+ & [ ... ] /; Both sides of the C<&> happen in parallel, so I would guess that they both match "foo" then stop. Please correct me if that's wrong. Were we using the procedural conjunction: "foobar" ~~ / <[a..z]>+ && [ ... ] /; I would gues...

& turning to &amp;
I'm doing an operation reformat and trying to use the & in a text box. In the trace it looks ok in the policy, but when it gets to the actual xml value it turns into this: <modify-attr attr-name="EG"> <remove-all-values/> <add-value> <value>&amp;</value> </add-value> </modify-attr> Can I fix this in policy builder or by escaping the character somehow? Or do I need a stylesheet to fix the problem? -- nate_spears ------------------------------------------------------------------------ It isn't a p...
Name: LeceHoigree Email: 101atmanga-kenseidotcom Product: eBay Companion Summary: - &#1489;&#1497;&#1514; &#1502;&#1500;&#1493;&#1503; &#1499;&#1508;&#1512;&#1497; & &#1495;&#1491;&#1512;&#1497;&#1501; &#1502;&#1512;&#1493;&#1493;&#1495;&#1497;&#1501; & &#1499;&#1508;&#1512; &#1489;&#1506;&#1497;&#1512; Comments: <a href=><img></img></a> ... 2005 & GridView & HyperLinkField & click event
Gang:I am trying to click on a HLF in a GV; however, I am unable to capture the declaration/click event.If I throw a test button on the page, the code behind for that click event fires off the code.How do I capture the click event for the HLF in the GV? What declaration/event am I trying to capture?A+ BS MCSE OOP Security+ Web DeveloperGet creative, not even. Hey,You can't capture the click event for HyperlinkField; HyperLink controls don't have a click event.Brian"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, ...

Web resources about - How to Edit & update & Delete a particular row of Gridview with code in c# & without using SQLDataSource -

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Using The LINQDataSource
-*+There is a new datasource control available in Visual Studio that works in much the same way as the SQLDataSource and the ObjectDataSource. ...

Gabriel Mongeon
Archive - Gabriel Mongeon

M ore d otnet .NET Interview Questions, ASP.NET, C#, VB.NET, XML, SQL Check Out √ .NET NOTES OOPS in .NET .NET ...

Architectural Overview of the Windows Presentation Foundation Beta 1 Release
Introduction Windows Presentation Foundation Beta 1 Windows Integration New Features WinFX SDK Exploring the New Features Introducing "Express" ...

About Mikesdotnetting
I started this site as somewhere to store answers to bits and pieces that I see asked frequently in the forums at . Rather than type ...

Using MiniProfiler with SqlDataSource ASP.NET WebForms Control
public class ProfiledSqlDataSource : SqlDataSource{ protected override DbProviderFactory GetDbProviderFactory() { // get the "base" DbProviderFactory ...

ASP.NET Pivot Table - RadPivotGrid for ASP.NET AJAX
... reports. RadPivotGrid allows easy customization of all data reports. Try now! Use any declarative data source control (AccessDataSource, SqlDataSource, ...

Sign on
Sign On • Join • Forums Home User Name * Password * Remember me next time ( I forgot my password ) SUBMIT YOUR WTF Content Random Article All ...

ComboBox Sample
ComboBox is an ASP.NET AJAX control that, like the AutoCompleteExtender , combines the flexibility of a TextBox with a list of options that users ...

Resources last updated: 12/28/2015 12:00:32 AM