I have wired up an ItemDataBound handler for my radgrid. Pretty simple standard fare (see code snippet below). However, I've noticed while stepping through the debugger on this that when the column value that I'm retrieving is an empty string, I'm actually getting back " "... so my code never thinks it's an empty string... I realize I could code something that looks for " " but that seems fragile.
So I was wondering how I would access not the value from the radgrid column (which appears to be applying some formatting or whatever), but the actual, true blue underlying value from the data source.
Any references on how to do so would be greatly appreciated.
So I was wondering how I would access not the value from the radgrid column (which appears to be applying some formatting or whatever), but the actual, true blue underlying value from the data source.
Any references on how to do so would be greatly appreciated.
protected void gvMain_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem gridRow = (GridDataItem)e.Item;
bool hasEamil = (gridRow["Email"].Text.Length > 0);
}
}