Hi every body.
I don't find how to determine if a column with a specific UniqueName exists in a ItemDataBound. My example here:
You see that I use a try catch to determine if a specific column exists in my GridDataItem. I don't find a Exists(UniqueName) or collections to loop all columns. Is there a solution to this specific question ?
I don't find how to determine if a column with a specific UniqueName exists in a ItemDataBound. My example here:
TableCell oCellStatus = null; |
try |
{ |
oCellStatus = oGridDataItem["StatusColumn"]; |
} |
catch |
{ |
oCellStatus = null; |
} |
if (oCellStatus != null) |
{ |
Image oImageStatus = new Image(); |
oImageStatus.ImageUrl = String.Format("~/App_Themes/{0}/Images/{1}", this.Page.Theme, "Status-" + oCellStatus.Text + ".png"); |
oCellStatus.Controls.Add(oImageStatus); |
} |
You see that I use a try catch to determine if a specific column exists in my GridDataItem. I don't find a Exists(UniqueName) or collections to loop all columns. Is there a solution to this specific question ?