Hi everybody,
This code
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton link = e.Row.FindControl("lnkbtnRemoveRole") as LinkButton;
if (link != null)
{
DataRowView view = e.Row.DataItem as DataRowView;
in RowDataBound method produces null as view, though I can see DataItem for the Row and all the columns while executing line by line.
Do you see what may be wrong here?
Same code works fine in another Grid. The difference here is that this grid uses DataObject as its DataSource, doesn't have select button and has template field. May be select button makes all the difference? Let me try to add it.
Thanks in advance.
If it's not broken, fix it until it is.
My Blog