hi folks,
how to invoke an event when i click button. Let me explain in details.. I've a Gridview and button*(button is outside the gridview) when I click the button I want to call RowDataBound event on button click.
I tried this but its not working....
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.RowDataBound += new GridViewRowEventHandler(GridView1_RowDataBound);
}
void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
FillGrid();
if (e.Row.RowType == DataControlRowType.DataRow)
{
int i = (int)DataBinder.Eval(e.Row.DataItem, "UnitsOnOrders");
if (i > 15)
{
e.Row.BackColor = Color.Magenta;
e.Row.ForeColor = Color.Wheat;
}
}
}