Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Accessing data from C# code-behind in the ItemDataBound Event

Reply
Thread Tools

Accessing data from C# code-behind in the ItemDataBound Event

 
 
hchattaway@bugcentral.com
Guest
Posts: n/a
 
      01-06-2005
Hello:

If I want to access a particular column of data that is bound to a
datagrid from within the ItemDataBound Event, how would I do that?

I am trying to construct a NavigationURL on the fly based on multiple
fields. I am creating a URL with multiple parameters....

?edititem.aspx?parm1=x&parm2=y

X and Y I want to populate with data from the current row...
Thanks
Harold

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      01-06-2005
Harold,

Use e.Item.Cells(i) where e is the event parameter and i is the column
number.

Eliyahu

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello:
>
> If I want to access a particular column of data that is bound to a
> datagrid from within the ItemDataBound Event, how would I do that?
>
> I am trying to construct a NavigationURL on the fly based on multiple
> fields. I am creating a URL with multiple parameters....
>
> ?edititem.aspx?parm1=x&parm2=y
>
> X and Y I want to populate with data from the current row...
> Thanks
> Harold
>



 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      01-07-2005
Hi,

Please see my anwser to ?how to get to the underlying data
in a datagrid control posted on Dec. 16/04

Elton Wang
http://www.velocityreviews.com/forums/(E-Mail Removed)

>-----Original Message-----
>Hello:
>
>If I want to access a particular column of data that is

bound to a
>datagrid from within the ItemDataBound Event, how would I

do that?
>
>I am trying to construct a NavigationURL on the fly based

on multiple
>fields. I am creating a URL with multiple parameters....
>
>?edititem.aspx?parm1=x&parm2=y
>
>X and Y I want to populate with data from the current

row...
>Thanks
>Harold
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing DataItems of other DataListItems from the ItemDataBound event Nathan Sokalski ASP .Net 1 05-27-2007 07:42 AM
GV Databound Event vs DG ItemDataBound Event GaryDean ASP .Net 1 08-18-2006 03:47 AM
Itemdatabound event fires once for Datagrid header only and NOT for data rows bkasmai@gmail.com ASP .Net Datagrid Control 0 07-23-2006 09:40 AM
Accessing the current DataRow of the DataSource from ItemDataBound Nathan Sokalski ASP .Net 5 09-25-2005 02:10 PM
ItemDataBound Event - How to access the previous record when this event is raised in DataGrid? NH ASP .Net Datagrid Control 2 12-17-2004 03:58 PM



Advertisments