datagrid errors

  • Thread starter Thread starter Kevin
  • Start date Start date
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?
 
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!
 
Back
Top