Groups | Blog | Home
all groups > asp.net > june 2003 >

asp.net : Item Cell Text in grid


dsoltesz
6/30/2003 5:16:53 PM
I have a grid that has a couple columns all are bound
columns except one..which is a button column. I use the
code

TableCell IDColumn = e.Item.Cells[1];
FileName = IDColumn.Text;

if I set the cell index to any of the bound columns I get
the text out of the cell...if I set the cell index to the
button column I don't get the value even though there is
data in the field?
Natty Gur
6/30/2003 8:18:04 PM
Hi,
e.Item.Cells[1]; return the cell. If you want other items IN the cell
use findControl.

If the button name/ID id MyID it should be:
e.Item.Cells[1].FindControl("MyID").Text;


Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
dsoltesz
7/1/2003 4:14:53 AM
Thanks

[quoted text, click to view]
Serdar Kalayci
7/1/2003 2:38:52 PM
I had a similar problem. How can access a TextBox's value in the column
footer when a button outside the DataGrid (that means I don't have e as
DataGridItemEventArgs) is clicked...

Serdar KALAYCI

[quoted text, click to view]

AddThis Social Bookmark Button