evaluate a null datagrid control?

  • Thread starter Thread starter sean
  • Start date Start date
S

sean

Hi There,

I have a stored procedure that returns a single row, depending on the
condition the stored procedure will sometimes return some null columns. Is
there a way to evaluate if the control is null and then suppress it from
display.

I am making the slow transition from asp to asp .net and I am having some
trouble with the syntax, could someone help me out with the syntax please.

Sean - thanks in advance



<%# DataBinder.Eval(Container.DataItem, "lbl12") %>
 
I'm not sure I follow you b/c the grid won't be null if you drag it onto the
screen. However, you can check if the dataTable.Rows.Count = 0 - this still
won't show you if it's null or not, but it will indicate that nothing has
been returned. If you are using the 1.1 framework then HasRows will work for
a datareader as well. You can check IsDbNull for a specific column/row
combination if that's what you're after.

If not, let me know.

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
 
Back
Top