Exemple #1
0
        protected void bindGrid()//binding gridview
        {
            ListToDataTable lsttodt = new ListToDataTable();
            var             lst     = _service.GetBatchesData();
            DataTable       dt      = lsttodt.ToDataTable(lst);

            if (dt != null && dt.Rows.Count > 0)
            {
                grd.DataSource = dt;
                grd.DataBind();
            }
            else
            {
                grd.DataBind();
            }
        }