Because from the suggested sites that Vinz gave me, i found that datatable/dataset wasnt in used. Query String("student ID") Dim str Subject Code As String = Request.
Source Error: Dear Shailesh Soni, Do i really need to used those? Text = str Section Dim str Table Name As String = LBSubject Code. Text 'Msg Box(str Table Name) Dim conn String As String = Configuration Manager. Connection String Using my Conn As New Sql Connection(conn String) my Conn.
I have loads of codes here, because ive tried every way possible. Public Sub GV_Student Record_Row Editing(By Val sender As Object, By Val e As System.
Then i want the user to be able to edit any row in the gridview, so i did this: Now I know i hav to use Row Editing event, Row Updating Event, Row Canceling Edit event to make everything work. I hoping someone could point me in the right direction on how to use these 3 events, what syntax/coding should i use to handle these 3 events.
Grid View Update Event Args) Handles GV_Student Record.
However, ill post my Page Load event codes for you(and anyone else) to see: Protected Sub Page_Load(By Val sender As Object, By Val e As System. Query String("subjectcode") Dim str Section As String = Request. This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled. You have mentioned that you have done fecth data through select query and bind grid. Command Text = "UPDATE " & str Table Name & " SET e Date='" & e Date & "', e Status='" & e Status & "' command. gurubhullar Hi, Data Set/Data Table in which you have get the data from database. Data Bind() End Sub Protected Sub GV_Student Record_Row Updating(By Val sender As Object, By Val e As System. Row Updating Dim conn String As String = Configuration Manager. Connection String Dim e Date, e Status As String Dim str Table Name As String = LBSubject Code. HTML CODE: C# Code Behind: private void Bind Data() protected void gv Categories_Row Editing(object sender, Grid View Edit Event Args e) protected void gv Categories_Row Updating(object sender, Grid View Update Event Args e) Hello Azam, Thanks for the prompt reply. Find Control("txt Category Description") as Text Box). Regards, Amol I am attempting to get the rowupdate event working with a gridview. Text; returns the the value of the "decription" which existed prior to typing in the new value. Thus every time I would click on Update, the data would get bound to the grid again after fetching the same data from the data base. I have a webpage that has a grid that allows select as well as edit. When I attempt to get to values in the rowupdating event I get the old values (which makes sense from your post). My question is that when I add the binding code inside If Not Page. Data Source = Get Data(); This Get Data function will return Data Set or Data Table. If still confusion then pls give your code by which you have bind grid. Make one function that will fetch data from database and and return Data Set/Data Table like, gv. Add(New Sql Parameter("@Subject Code", LBSubject Code.