Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
hello friends i m having gridview items are name,firstname,lastname
 
by using datatable i showed the details in gridview.
 
i used name item template as linkbutton
 
when i click any name in gridview... the row details will shown in textboxes... by that i want to update edit and delete the record.without using default edit,update and delete event in gridview give me some solution please
Posted 18-May-11 2:36am
Edited 18-May-11 4:22am
v5
Comments
rahulrcn at 18-May-11 8:03am
   
not clear
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Take a look at this-[How to get the Values of Selected Row from a Gridview in TextBox using ASP.NET][^] article which will guide you how to do it with snaps as well as code.
Try it!
  Permalink  
Comments
beginner in C#.net at 18-May-11 8:24am
   
in that tutorial we can select using default select button. i want to get data when i click any data in gridview
Mollly Qi at 14-Nov-12 21:34pm
   
the link is broken, I can't see anything!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

get the gridview selected index and using that index display textboxes like
 
textbox1.text=gridview1.rows[index].cells[0].tostring();
....
....
 

and then inserting,updating and deleting are very easy part.
  Permalink  
Comments
Member 10056579 at 9-Jun-13 9:02am
   
after selected row in textbox how to update from button control ????

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 19 May 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100