Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2004, 02:15 PM
Registered User
 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't read new data from DataGrid cell

Dear All!
Could you please give me advise what I'am doing wrong? I created typed DataSet, bound formatted DataGrid to the DataSet table and wrote code in the Edit and Update events of the DataGrid (using sample code, but in the sample data source is DataReader). In the Update event I am using a=CType(e.Item.FindControl(myTextBox),TextBox).Tex t code to read from cell. But the data is old! User put 10 in the cell, but a still 2 as was before editing :-(

Thank you,
Alex
 
Old October 16th, 2004, 11:03 AM
Registered User
 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Anybody home?

 
Old October 16th, 2004, 02:15 PM
Authorized User
 
Join Date: Sep 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you provide the code?
Are you putting a value in the text box in a Page_Load function? If so, you need to put that in side an if statement like:
If Not IsPostBack Then
End if
That way it won't plug your initial value in when the page is reposted by the user.

-Hunter
 
Old October 17th, 2004, 11:51 PM
Registered User
 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!
I found error! I put code in the "ItemCommand" event that binds DataGrid to DataSource again without analyzing "e.CommandName".

Thank you!
Regards






Similar Threads
Thread Thread Starter Forum Replies Last Post
Blink Datagrid cell data?? vinodjangle ASP.NET 2.0 Professional 1 April 18th, 2008 09:51 AM
how to read data from the cell of the gridview maheshgunjady ASP.NET 1.0 and 1.1 Basics 0 October 24th, 2007 11:03 AM
Getting DataGrid Cell Data lifewarped General .NET 2 February 20th, 2005 07:00 PM
How to add data to a DataGrid Cell. chiefouko VS.NET 2002/2003 2 July 28th, 2004 01:24 AM
Read cell in the DataGrid? drasko ASP.NET 1.0 and 1.1 Professional 1 December 18th, 2003 10:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.