Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid - All except first

Status
Not open for further replies.

netangel

Programmer
Feb 7, 2002
124
PT
I need to put a link on all rows except first one of a datagrid.

Is there any easy way? NetAngel
 
Put the link on all rows declaratively in your .aspx page.

Use itemDataBound event to remove it from the first row of the grid at runtime.

Let me know if you need examples how to do that.

:)
paul
penny1.gif
penny1.gif
 
Thanks. I knew it had to be easy. I was trying to do it using an extra field in my SQL statment, and then catch it on the DataBindings.

This is my code (ItemDataBound event), should anyone need it:
Code:
If e.Item.ItemIndex = 0 Then
    e.Item.FindControl("hlEliminar").Visible = False
End If

Thanks again Paul NetAngel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top