Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 December 18th, 2003, 03:48 AM
Authorized User
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Read cell in the DataGrid?

Hi all,

In my DataGrid1 I want to read one cell (data type int from database) and put it's value in the TextBox1 control.

    private void DataGrid1_UpdateCommand(object source,
           System.Web.UI.WebControls.DataGridCommandEventArgs e)
     TextBox1.Text = (Convert.ToInt64((e.Item.Cells[1].Controls[0]))).ToString(); 

I got run time error mesage : "Specified cast is not valid."

Can anyone tell me how to do this casting?

Old December 18th, 2003, 10:43 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

This is a cross post to this thread. Please don't cross post unless you don't get any response after some reasonable amount of time on the other thread.

Work smarter, not harder.

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Highlight Datagrid Cell derekl ASP.NET 1.0 and 1.1 Basics 1 July 28th, 2006 06:12 AM
Can't read new data from DataGrid cell Guest00 ASP.NET 1.0 and 1.1 Basics 3 October 17th, 2004 11:51 PM
Datagrid cell content value sinba Beginning VB 6 1 August 24th, 2004 01:58 PM
DataGrid Cell mrideout BOOK: Beginning ASP.NET 1.0 0 August 17th, 2004 12:34 PM

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