For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > February 2007 > Get DataField Item of a Column?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Get DataField Item of a Column?
mianiro

2007-02-27, 7:12 pm

Is it possible to dynamically get the datafield item that populates a
column in gridview?

Something like grid.columns(0).????

Eliyahu Goldin

2007-02-27, 7:13 pm

If you handle RowDataBound event, DataItem property points you to the
datasource item bound to the row. You can typecast it to your datasource
type and access the datasource fields or properties.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"mianiro" <mianiro@gmail.com> wrote in message
news:1172605486.014056.102380@z35g2000cwz.googlegroups.com...
> Is it possible to dynamically get the datafield item that populates a
> column in gridview?
>
> Something like grid.columns(0).????
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com