943,675 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 6909
  • ASP.NET RSS
Dec 31st, 2008
1

gridview control,edit update delete

Expand Post »
hi i want to have the code for editing,updating n deleting data in gridvoiew
i tried a lot searching in google..i trid also but could not get the output....i want how to insert textboxes using the edit colums ....i want in detail pls help...

2.next is how to add rows dynamically to gridview n custom columns to gridview...if u answer many may find useful as this is the baic of gridview...pls do help...i want indetail...
Similar Threads
Reputation Points: 7
Solved Threads: 0
Newbie Poster
divyasrinivasan is offline Offline
21 posts
since Dec 2008
Dec 31st, 2008
0

Re: gridview control,edit update delete

Hope this will be helpful for your first question

http://msdn.microsoft.com/en-us/library/ms972940.aspx

Hope this will be helpful for your second question
http://devpinoy.org/blogs/keithrull/...h-asp-net.aspx
Reputation Points: 16
Solved Threads: 18
Junior Poster
Aneesh_Argent is offline Offline
104 posts
since Dec 2008
Jan 1st, 2009
0

Re: gridview control,edit update delete

Reputation Points: 10
Solved Threads: 9
Junior Poster
sierrainfo is offline Offline
144 posts
since May 2008
Jan 2nd, 2009
0

Re: gridview control,edit update delete

Reputation Points: 10
Solved Threads: 6
Light Poster
vizy is offline Offline
36 posts
since Dec 2007
Jan 3rd, 2009
0

Re: gridview control,edit update delete

thanks everyone for replying ..iam trying out if ny doubts will get back..thanks a lot
Reputation Points: 7
Solved Threads: 0
Newbie Poster
divyasrinivasan is offline Offline
21 posts
since Dec 2008
Jan 4th, 2009
0

Re: gridview control,edit update delete

this code may help you to find your solution




asp.net Syntax (Toggle Plain Text)
  1. <%@Import Namespace= "System.Data.Oledb" %>
  2. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="datagrid.aspx.vb" Inherits="datagrid" %>
  3.  
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5.  
  6. <script runat ="server" >
  7.  
  8. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  9.  
  10. Dim conathors As New OleDbConnection
  11. Dim cmd1 As New OleDbCommand
  12.  
  13. conathors = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DATA Source=e:\nitu\vb.net\database-for-pre.mdb")
  14. conathors.Open()
  15.  
  16. cmd1 = New OleDbCommand("select fname,lname,id from new_user", conathors)
  17. dgrd.DataSource = cmd1.ExecuteReader()
  18. dgrd.DataBind()
  19.  
  20. conathors.Close()
  21.  
  22. End Sub
  23.  
  24. Sub DataNavigateUrlFormatString()
  25.  
  26.  
  27. End Sub
  28.  
  29.  
  30. </script>
  31.  
  32. <html xmlns="http://www.w3.org/1999/xhtml" >
  33. <head runat="server">
  34. <title>Datagrid HyperLink</title>
  35. </head>
  36. <body>
  37. <form id="form1" runat="server">
  38. <asp:DataGrid ID="dgrd" AutoGenerateColumns ="false" EnableViewState ="false" CellPadding ="10" runat ="server" >
  39.  
  40. <Columns >
  41.  
  42. <asp:BoundColumn HeaderText ="Student id" DataField ="id" />
  43. <asp:HyperLinkColumn HeaderText ="Detail" DataNavigateUrlField ="id" DataNavigateUrlFormatString ="detail1.aspx?id={0}" Text ="view Detail" />
  44. </Columns>
  45.  
  46. </asp:DataGrid>
  47. <div>
  48.  
  49. </div>
  50. </form>
  51. </body>
  52. </html>
Last edited by peter_budo; Jan 11th, 2009 at 2:43 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 0
Solved Threads: 1
Light Poster
nitu_thakkar is offline Offline
25 posts
since Jan 2009
Jan 6th, 2009
0

Re: gridview control,edit update delete

this code may help you:
<don't ask foolish questions>
http://www.daniweb.com/forums/thread166180.html
</don't ask foolish questions>
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Jan 7th, 2009
0

Re: gridview control,edit update delete

hi ...
thanks a lot..i got how to edi,update,n delete..now i want to validate the textbox wen i press update...like i want to ckeck for null vlues entry...only numbers.......i am searching for javascript but no proper result...

any links ..pls post....
Reputation Points: 7
Solved Threads: 0
Newbie Poster
divyasrinivasan is offline Offline
21 posts
since Dec 2008
Apr 10th, 2009
0

Re: gridview control,edit update delete

YOU can also vist 2 links:
http://shawpnendu.blogspot.com/2009/...eteupdate.html

FOR template column yu can read below link:
http://shawpnendu.blogspot.com/2009/...l-data-in.html
Reputation Points: 26
Solved Threads: 44
Posting Whiz in Training
mail2saion is offline Offline
247 posts
since Apr 2009
Apr 12th, 2009
0

Re: gridview control,edit update delete

HI,
SORRY PLEASE AVOID MY ABOVE POST. FOR NUMERIC VALIDATION YOU CAN RAED THE BELOW LINK:
http://shawpnendu.blogspot.com/2009/...isnumeric.html

HOPE IT WILL HELP YOU.
Reputation Points: 26
Solved Threads: 44
Posting Whiz in Training
mail2saion is offline Offline
247 posts
since Apr 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: tree view problem
Next Thread in ASP.NET Forum Timeline: Web form





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC