•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,440 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,838 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1248 | Replies: 2
![]() |
•
•
Join Date: Sep 2006
Posts: 104
Reputation:
Rep Power: 3
Solved Threads: 0
I am displaying a GridView on some specific criteria which is entered by some textboxes say studentid, studentname as input from textbox and show records in GridView.
For this I m using a stored procedure which returns a datatable based on inputs came from textboxes.
I want an Edit button in the Gridview on click of which a <div> with some label and textbox controls get displayed with prefilled entries.
For this I want the datarow from the datatable got from the stored procedure, from where I will get the complete info. Also I want to edit the data.
How can I get the row details of specified Edit button row and which way is better put a command button control in ItemTemplate of GridView or use a Buttonfield cotnrol inside the GridView?
I am working in ASP.NET2.0 and C#.
I m not getting the correct way, can anybody suggest me?
Thanks in advance,
For this I m using a stored procedure which returns a datatable based on inputs came from textboxes.
I want an Edit button in the Gridview on click of which a <div> with some label and textbox controls get displayed with prefilled entries.
For this I want the datarow from the datatable got from the stored procedure, from where I will get the complete info. Also I want to edit the data.
How can I get the row details of specified Edit button row and which way is better put a command button control in ItemTemplate of GridView or use a Buttonfield cotnrol inside the GridView?
I am working in ASP.NET2.0 and C#.
I m not getting the correct way, can anybody suggest me?
Thanks in advance,
you can show a "select" button and then
in the "selectedindexchanged" of the gridview show the selected row in the controls i.e text boxes and labels such
as
textbox1.text = gridview1.selectedrow.cell(0).text
remember that indexes of grid are zero based. Obviously you will have a save button on your page or form and edit the selected text as required and then click that button and do the database operation as required.
Hope this will help you. if you need a detail presentation i can send you a sample page.
in the "selectedindexchanged" of the gridview show the selected row in the controls i.e text boxes and labels such
as
textbox1.text = gridview1.selectedrow.cell(0).text
remember that indexes of grid are zero based. Obviously you will have a save button on your page or form and edit the selected text as required and then click that button and do the database operation as required.
Hope this will help you. if you need a detail presentation i can send you a sample page.
Thanks and Best of Lusk,
Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
•
•
Join Date: Sep 2006
Posts: 104
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
you can show a "select" button and then
in the "selectedindexchanged" of the gridview show the selected row in the controls i.e text boxes and labels such
as
textbox1.text = gridview1.selectedrow.cell(0).text
remember that indexes of grid are zero based. Obviously you will have a save button on your page or form and edit the selected text as required and then click that button and do the database operation as required.
Hope this will help you. if you need a detail presentation i can send you a sample page.
I am a bit confused what should I use a buttonfield inside GridView or an ItemTemplate with a command button?
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Hi all
- Next Thread: Please help me


Linear Mode