GridView行绑定

站在用户的角度思考问题,与客户深入沟通,找到都匀网站设计与都匀网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都网站设计、成都做网站、企业官网、英文网站、手机端网站、网站推广、主机域名雅安服务器托管、企业邮箱。业务覆盖都匀地区。

                   

                       

                   

               

 

protected void gridList_RowDataBound(object sender, GridViewRowEventArgs e)

    {

        if(e.Row.RowType == DataControlRowType.DataRow)

        {

            DataRowView cutRow =(DataRowView)e.Row.DataItem;

            //对应值

            stringstrID = string.Empty;

            stringstrProjStatenm = string.Empty;

            try

            {

                strID = cutRow["id"].ToString();

                strProjStatenm =cutRow["proj_statenm"].ToString();

                Label xLabel =(Label)e.Row.FindControl("lblFlow");

                if (xLabel != null)

                {

                    if (strProjStatenm == "审批中")

                    {

                        string strSql = string.Format("select f_transidstepname({0}) from dual ",strID);

                        xLabel.Text= string.Format("审批中-{0}",OracleHelperImm.ExecuteScalar(strSql));

                    }

                    else

                    {

                        xLabel.Text= strProjStatenm;

                    }

                }

            }

            catch(System.ArgumentException ex)

            {

                //忽略 

 

            }

 

  }

}


文章题目:GridView行绑定
文章分享:http://pwwzsj.com/article/pphjgo.html