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

Message when cell inside gridview is empty

Status
Not open for further replies.

kebele

MIS
Jul 31, 2006
107
US
Hi all,

How can you show certain messages when the cell inside the GridView control does not contain any data? Your help is appreciated.
I do not know if I am on the right track and what I need to make the below code complete.

Protected Sub gvphldetail_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvphldetail.RowDataBound

If e.Row.RowType = DataControlRowType.DataRow Then


End If


End Sub
 
I would do this in the sql that generates the data for the grid. If you are using SQL Server, use IsNull()

JIm
 
That is what i thought too.I was just looking for second opinion and thanks for that.
 
You could use the RowDataBound and then loop through each column and check the contents and change as necessary. But much easier to do it in sql..

Jim :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top