C
craigkenisston
Hi,
In a datalist I'm displaying data comming from a SQL Server stored
procedure that contains null values in numeric values. Since the stored
is already used in other applications I can't change it.
So, I need to catch this nulls and convert them to zeroes so, they
display in the TD on the table I have in the datalist.
I have this method :
private void Repeater1_ItemDataBound(object sender,
System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
double d01;
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
if (DataBinder.Eval(e.Item.DataItem, "mypossiblenullfield") == null)
{
// what do I do here ?
}
};
}
It seems this code is being hitted, but I don't know how to change or
how to access the value of the DataItem.
Thanks in advance,
In a datalist I'm displaying data comming from a SQL Server stored
procedure that contains null values in numeric values. Since the stored
is already used in other applications I can't change it.
So, I need to catch this nulls and convert them to zeroes so, they
display in the TD on the table I have in the datalist.
I have this method :
private void Repeater1_ItemDataBound(object sender,
System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
double d01;
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
if (DataBinder.Eval(e.Item.DataItem, "mypossiblenullfield") == null)
{
// what do I do here ?
}
};
}
It seems this code is being hitted, but I don't know how to change or
how to access the value of the DataItem.
Thanks in advance,