You could also check out the ASP.NET quick start pages at
http://samples.gotdotnet.com/quickstart/aspplus/
The "Server-side data access" pages go through the datagrid at a high level.
--
Ben Strackany
www.developmentnow.com
"Grant" <> wrote in message
news:...
> No worries I figured it out. I just set the text using the property
builder
> then assigned an event handler to it. Then get the cell value using
>
> TableCell itemCell = e.Item.Cells[2];
> string item = itemCell.Text;
>
> Couldnt be easier.
>
> Cheers,
> Grant
>
> "Grant" <> wrote in message
> news:O%23bWd%...
> > Thanks for replying Andrew that did the trick. One more question though,
I
> > have set one of the columns to be a delete colum as in the following
code:
> >
> > ButtonColumn hlcDelete = new ButtonColumn();
> > hlcDelete.Text = "Delete";
> >
> > Problem is when the button is created it has no ID or event handler
> > assigned to it. i need to be able to determine either what row was
> > selected or what the value of the ID field in that row is so that I can
> > create a SQL query to delete that record. There are not any samples that
i
> > can find - all of them are done in ASP code, and I prefer not to use the
> > designer to set these sorts of things. Can this sort of thing be done in
> > c# code when Im binding the datareader?
> >
> > Cheers,
> > Grant
> >
> >
> > "Andrew L. Van Slaars" <> wrote in message
> > news:...
> >>I just saw your second question... you could do this using the same
steps
> >>as listed in my last response, but instead of the hyperlink column, use
> >>the button column, or you could use a template column if you wanted more
> >>control and options within the cells.
> >>
> >> -Andrew
> >>
> >> "Grant" <> wrote in message
> >> news:%...
> >>>I am filling a datareader and then assigning the reader to the datagrid
> >>>as follows:
> >>>
> >>> SqlDataReader reader = ADOConnect.populateDatareader();
> >>> AllResultsDataGrid.DataSource = reader;
> >>> AllResultsDataGrid.HeaderStyle.Font.Bold = true;
> >>> AllResultsDataGrid.DataBind();
> >>>
> >>> My question is how do I specify that foreach row in the first column -
> >>> the text is a hyperlink? This column contains an ID which Id like to
> >>> have as a hyperlink so that the user can be directed to another page
> >>> where they can edit information for that record. I can do this when
> >>> binding the datagrid to a recordset, but Id like to use the datareader
> >>> instead if possible.
> >>>
> >>> Another question I have with this datagrid is, I want to be able to
> >>> delete a row from this page, so could I add an additional column at
> >>> runtime with a button or link foreach record - with a funtion
attached?
> >>>
> >>> Cheers,
> >>> Grant
> >>>
> >>
> >>
> >
> >
>
>