edit and update a gridview control

Hi,
Here's my question:

The gridview shows all the items the student has already learned.  

Can the gridview be updated to add new data?  

For instance, the user wants to add another piece of item to learn and give a brief reason?  I will add the dropdownlist and textbox control to the gridview (in edit mode, I assume)The dropdownlist will be bound to a datasource.  Once the user has made a selection and typed a reason in the textbox, they will update the gridview to show what they have done.  AFter they see that, they click a button which will launch a new page with the gridview so that an approver can approver can "ok"  or "deny" the request.

I don't know how to edit or update the gridview.  Can someone tell me how this is done or if this makes sense to do this way?

Thanks in advance
0
robin2009
4/22/2009 2:23:02 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

4 Replies
697 Views

Similar Articles

[PageSpeed] 11

robin2009:
I don't know how to edit or update the gridview
 

Hello,

This may help you to get started:

GridView Insert, Edit, Update and Delete – The Ado.Net way


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
4/22/2009 3:17:10 PM

I have come across your post at least 3 different times just worded different.  Duplicate posts are frowned upon. 

I believe I have answered your question here.

http://forums.asp.net/t/1414073.aspx


View Brenden Kehren's profile on LinkedIn
Remember to mark as answer if this post answered your question.
0
b471code3
4/22/2009 3:40:42 PM

b471code3,

The first post took almost 24 hours to get approved and since I didn't see it this morning, I wasn't sure it would be approved so I thought about using different ways to do this.  I wanted my question answered.  I'm a newbie, geez, give me a break....

0
robin2009
4/22/2009 4:32:50 PM

robin2009:

b471code3,

The first post took almost 24 hours to get approved and since I didn't see it this morning, I wasn't sure it would be approved so I thought about using different ways to do this.  I wanted my question answered.  I'm a newbie, geez, give me a break....

Sorry for giving you a hard time.  Glad I could help out.  With this forum patients is a virtue...


View Brenden Kehren's profile on LinkedIn
Remember to mark as answer if this post answered your question.
0
b471code3
4/28/2009 3:04:57 PM
Reply:

Similar Artilces:

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: http://forums.asp.net/t/1069245.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

gridview control in another gridview control
Hi ia have a questioni have a gridview control which contains button in one colum.now my question is i need another gridview to be placed in the  first gidviewso that when i click on the button the second gridview will populate the data.now my question is how to place second gridview in first gridview.or is there any approach like first grid itself acting as parent and child.please help me  Hi sirikalavalapalli:                I think nested gridview will help you. Check this link and it will show you how...

Updating and binding control to other controls within the same row of a GridView
HiIn the EditTemplate of my GridView I show 2 DropDownLists. When the user selects the first dropdownlist, I need it to update the contents of the second dropdownlist. I have my Subs that do this fine when not inside the GridView, but what is the correct way to do it whilst they are in the GridView?This is my current attempt that returns the error 'Object reference not set to an instance of an object'. I presume its related to correctly targeting the DropDownList in question? This is my GridView:<asp:GridView ID="GridView1" runat="server"  &...

Getting the control id of a control inside gridview control
 uhmm.. a little bit confusing regarding my subject because i dont know how to say it...by the way my problem is how can i get the id of a control (e.g. textbox) inside the gridview... and the textbox is in the templatefield... is there any way i can get its id??  hoping i could get a reply as soon as possible... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) What do you want's to do by getting the id of the Text box? Do you want's to find particular Textbox with certain id ? Kamran ShahidSr. Software Engineer(MCP,MCAD.net,MC...

Edit data with GridView Control ? or another control ? help
I use GrivView in ASP.Net 2.0 to show data from DataTable. And i want to edit some fields in some rows. How can I do it? If i touch EDIT button - all columns, which have ReadOnly=false, switch into EDIT mode. But I want, that in first raw I can edit 2,3 column and in second row only 3 column. How can I do it ? ...

Handling control events while in edit mode for a gridview control
I have a dropdownlist and checkbox in a single column of a gridview. While the row is in edit mode, I want to set the visibility of the checkbox based on the value selected in the dropdown list. I can do this easily enough  when the row is first put into edit mode, but how do I access the dropdown list's change event when the row is already sitting there in edit mode? Thanks for any help you can provide.   Penny Penny, Just create a SelectedIndexChanged event like below. Create a row object for the currently edited row, find the checkbox you want to control, then set the Visib...

how to populate a dropdownlist control and update the selected item in a gridview control
Hi friends help me with this ... Requirement: 1) i want to populate a dropdownlist(ddl) in a gridview when clicking the edit button of a perticular row by using gridview events and also update the selected item of the ddl to the database. 2) also i don't want to use sqldatasource controls i.e. we should take the help of only gridview events 3) DropDownList will be populated fom TableB: Actions taken: In page_load while binding the grid i m getting the error: Cannot perform '=' operation on System.Int32 and System.String  my fields and datatypes are as follows...

Help me update related controls after a control was updated.
I have nested UserControls on page. What I need to do is to update Profile UserControl after an item was deleted from the list of items. We are using AJAX (ATLAS) in our project. Which principle do I need to use to accomplish that task? How would you do it? Thank you. "A successful person is one who can lay a firm foundation with the bricks that others throw at him." http://www.russiangeek.com/ hello. well, can you explain this a little better?-- Regards,Luis Abreuemail: labreu_at_gmail.comEN blog:http://msmvps.com/blogs/luisabreu Luis Abreu: hello. well...

Help Req: !!! :- On Disabling Controls Present inside a Gridview control
Hi All, We have A requirement Where we have disable controls inside a grid.These controls can be textbox, DropDownlist (in TemplateField), ComandField present inside the grid.We have to call a generic method for doing the same .(since it can be done for multiple grid.) PFB the code snippet we use. Which disables all the controls inside the page.The bolded part of the code is used to loop inside a grid view.(Not Working.)Is this ideal way to deal with the requirement.Or can someone suggest be a better way.        public void DisableMe(Page p1, st...

Gridview control embedded in another gridview control
I am writing an ambulance crew scheduling application on the web and I need some help completing the last part.  I have an access database that has three tables: user table, shift table (describing the shifts available), and a schedule table (that stores shift by shift_id and user by user_id).  I have a gridview control that will display the available shifts but I cannot get the embedded gridview control that will display the user that is signed up for each shift to display because I cannot figure out how to use the OnRowDataBound method.  I need a simple VB example of how to...

Getting/Updating and Binding a Control in the Edit Template of a Grid View Control
 Hi,               I am curious how do I update (or data bind) a drop down list in the edit template of a Grid View Control.             My problem is that in the GridView_RowEditing() method, the drop down list does not seem to exist. It only appears when the DropDownList_DataBound() method gets called. I can get the data for the DropDownList and attempt to bind it in this method, but then calling the DropDownList.DataBind()calls DropDownList_DataBound(), a...

Catch 22: Updating an editable GridView control?
Perhaps you can see the problem right away here... Dim strSQL As String = _          "UPDATE [tblICPMethods] SET [Frequency] = @Frequency, " & _          "[Calibration] = @Calibration, [QCValue] = @QCVAlue" & _          "WHERE [Frequency] = @Frequency AND [MethodNumber] = @MethodNumber" One of the fields the user can update is also one of two fields used as the primary key (MethodNumber being the other). @Freqeuncy will be the new value th...

Updating and Editing options missing from GridView control.
I have followed lot of examples, tutorial and webcast, all of them show 5 options with GridView smart control.  For some reason in my case it shows only paging, sorting and selcting.  I am missing updating and deleting options.  Please ntoe, I am using the visual stutio 2005 professional.  Thanks....

Web resources about - edit and update a gridview control - asp.net.presentation-controls

GridView SelectedItem Binding Gotcha in WinRT
Last night when I was doing some WinRT hacking I was trying to setup databinding to the selected item in the GridView control and I ran into ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Advanced Search Gridview Latest News Releases All ...

CNW Group
... Services Beyond the Wire About CNW my CNW CNW Access CNW Directories Financials Webcasts Events my CNW All News Releases Advanced Search Gridview ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Add a Filter Gridview Latest News Releases All Today ...

New CmdLets of Powershell 2.0
New CmdLets of Powershell 2.0

Price Drop: Softbox
... objects- create product reflection- changing the background with something more interestingUse it as:- softbox- honeycomb softbox- gridview ...

Profile.aspx: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 25 Oct 2012

DotNetKicks.com - Upcoming stories
DotNetKicks.com is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

View Features - ExtendASP
Call 847-681-9827 or Request a Demo View Features Testimonials Pricing About Us Coming Soon ExtendASP exposes every feature, more than any other ...

Resources last updated: 1/15/2016 9:18:03 PM