W
WebBuilder451
I'm attempting find the cell id, i (e.row.cells ) given a control in that
cell.
using this function:
private int GetcellPosition(GridViewRow gvr, string ctrlID)
{
var iCell = -1;
for (int i = 0; i < gvr.Cells.Count; i++ )
{
if ( gvr.Cells.FindControl(ctrlID) != null )
{
iCell = i;
break;
}
}
return iCell;
}
CALL: e.Row.Cells[GetcellPosition(e.Row, "LabelPerBS")].CssClass= "gvir2";
this does not work. It appears to be doing a find on the entire row so the
first position always gets returned. Is there a way to do this or am i
hitting a limitation?
thanks
kes
cell.
using this function:
private int GetcellPosition(GridViewRow gvr, string ctrlID)
{
var iCell = -1;
for (int i = 0; i < gvr.Cells.Count; i++ )
{
if ( gvr.Cells.FindControl(ctrlID) != null )
{
iCell = i;
break;
}
}
return iCell;
}
CALL: e.Row.Cells[GetcellPosition(e.Row, "LabelPerBS")].CssClass= "gvir2";
this does not work. It appears to be doing a find on the entire row so the
first position always gets returned. Is there a way to do this or am i
hitting a limitation?
thanks
kes