Snippets
24

protected void GridViewOrders_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        LinkButton sndTextButton = (LinkButton)e.Row.FindControl("LinkButtonSendText");
        int orderStatusCode = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "OrderStatusCode"));
        var cellphone = DataBinder.Eval(e.Row.DataItem, "ClientCellPhone");


        if (orderStatusCode == 3 && cellphone.ToString().Length > 10)
        {
            sndTextButton.Visible = true;
        }
    }
}

Post Rating

Comments

There are currently no comments, be the first to post one!

Post Comment

Only registered users may post comments.

  120 OLD FREEMANS WAY, BREWSTER, MA 02631
  P. O. BOX 2342, BREWSTER, MA 02631
  (774) 323-3176
  CONTACT US