开发者

App is sending an email to the wrong person, anyone knows why or how to resolve?

开发者 https://www.devze.com 2023-04-11 04:11 出处:网络
I am still having some issues with the issue I posted last time regardin formview not 开发者_运维百科updating correctly.

I am still having some issues with the issue I posted last time regardin formview not 开发者_运维百科updating correctly.

I have managed to narraow the problem to one sub below:

My issue appears to be on this line:

tbl.Rows.AddAt(tbl.Rows.Count - 1, row)

Anytime I attempt to update a row, only the first row gets updated. Subsequent rows don't get updated. Instead, when I click "Update", the cursor moves down to the next record without updating it.

When I commented out this

tbl.Rows.AddAt(tbl.Rows.Count - 1, row), I can now update each and every row.

After updating the row, an email goes out to the individual advising him/her about the update s/he just made. The problem is that email is getting sent to the wrong person and that's because of that one line that I just commented out.


When you are updating via tbl.Rows.AddAt, you are only updating the grid HTML, not the database. You need to make your changes to the underlying data source which is bound to the grid, and then possibly will need to re-DataBind the grid so that it sees the updated data source.

0

精彩评论

暂无评论...
验证码 换一张
取 消