datagrid errors

K

Kevin

What is the correct way to check for this inside a grid?

<% If Container.DataItem("from_fly_from") <> "" then %>

I want to only display info in a grid if it exists... is this possible?
 
S

Scott Mitchell [MVP]

What is the correct way to check for this inside a grid?
<% If Container.DataItem("from_fly_from") <> "" then %>

I want to only display info in a grid if it exists... is this possible?

Kevin, the easiest way is to probably use a TemplateColumn with a "helper
function". I discuss how to do this at
http://datawebcontrols.com/faqs/CustomizingAppearance/ConditionalFormatting.shtml,
as well as in my book, ASP.NET Data Web Controls Kick Start.

Happy Programming!

--

<shameless plug>
For more information on the DataGrid, DataList, and Repeater controls,
consider picking up a copy of my latest book:

ASP.NET Data Web Controls
http://www.amazon.com/exec/obidos/ASIN/0672325012/4guysfromrollaco
</shameless plug>

Happy Programming!

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top