473,320 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Editing Gridview template field problem

2
I am having a problem when I am updating my rows. The data is being typed in is getting overriden by the data that was previously there. Does anyone know how to fix this?

Expand|Select|Wrap|Line Numbers
  1. protected void HFReportGrid_RowUpdating(object sender, GridViewUpdateEventArgs e)
  2.     {
  3. TextBox Points = HFReportGrid.Rows[e.RowIndex].FindControl("txtPoints") as TextBox;
  4. TextBox Comment = HFReportGrid.Rows[e.RowIndex].FindControl("txtComment") as TextBox;
  5. string temp = "Update HFReportComment set ManagerPoints = " + Points.Text + ", Comment = " + Comment.Text;
  6.         HFReportGrid.EditIndex = -1;
  7.         BindGridView(temp);
  8.     } 
  9.  
Aug 4 '10 #1
0 1059

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ram | last post by:
I'm using detailsview control with a template field which contains a dropdownlist I databind the dropdownlist during page load, now the problem is dropdownlist loses state during postbacks, i...
1
by: Miguel Dias Moura | last post by:
Hello, I have a GridView in my page with a TemplateField and an Asp Label inside it. I need to access that Label in runtime and change the field to which it is binded. Can someone please...
0
by: Yog | last post by:
Hi, How to access the value of a Texbox column(Template field) in gridview and to update a column next to it in the Gridview...! Example:Let's say there are four columns Product,Cost,Quantity...
2
by: Will Winn | last post by:
I have a gridview template field that I would like to get the value of during the RowEditing event, but can't figure out how. Here's an example of how I get the value of a cell for the row being...
3
by: shapper | last post by:
Hello, In my GridView I have a HyperLink Field where I set the DataNavigateUrlFormaString MyHyperLinkField.DataNavigateUrlFormatString = "~\RSS.ashx?Channel={0}&Culture=" &...
2
by: rodchar | last post by:
hey all, you know in the gridView quick task menu how you have the option of taking a bound column and converting it into a TemplateColumn. Alright, once i do that i goto edit the template column...
2
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I have the foll template field <asp:TemplateField HeaderText="Quantity" ItemStyle-HorizontalAlign="center"> <ItemTemplate> <%# Eval("quantity") %> </ItemTemplate> <EditItemTemplate>...
0
by: sgandikota | last post by:
I'm using a a GridView TemplateColumn(linkbutton). When we double click on the Linkbutton in the templatefield, an event will be generated in the code behind file. How can we access the...
1
by: zergziad | last post by:
Hi All, I really need help to solve my problem. My case is on looping through textbox in gridview. I had a gridview placed in my page. The gridview contains template field which I created it...
1
by: bob | last post by:
Hi, How can you bind a Calendar control in a template field when the data is null? i.e. The bound data is a null date. I would like to use a calendar control in the edit template to update the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.