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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text in datagrid cell 1

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
US
Hello,
I am displaying data in the datagrid, but I am trying to append some text to one of the cells. The datagrid displays the minutes someone used something. I would like it to say 'xxx minutes', instead of just 'xxx', where 'xxx' is the number of minutes. Any help would be appreciated. Thanks in advance!

 
in the onitemdatabound event
you could handle it..... something along this way
Code:
Private Sub myGrid_ItemDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles MyGrid.ItemDataBound

If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
  e.Item.Cells(2).Text =   e.Item.Cells(2).Text & " minutes"
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top