Exemplo n.º 1
0
        private void BindGridView()
        {
            try
            {
                ds = objPlaceholderBL.GetPlaceHolderList();
                dt = ds.Tables[0];

                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        GV_MenuContentList.DataSource = dt.DefaultView;
                        GV_MenuContentList.DataBind();
                    }
                    else
                    {
                        GV_MenuContentList.DataSource = null;
                        GV_MenuContentList.DataBind();
                    }
                }
                else
                {
                    GV_MenuContentList.DataSource = null;
                    GV_MenuContentList.DataBind();
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 2
0
        private void BindGridView()
        {
            try
            {
                objMenuContentSchema.MenuID = Convert.ToInt32(Request.QueryString["MenuID"]);
                ds  = objMenuContentBL.GetMenuContentList(objMenuContentSchema);
                dt  = ds.Tables[0];
                dt1 = ds.Tables[1];

                if (dt != null && dt1 != null)
                {
                    if (dt.Rows.Count > 0 && dt1.Rows.Count > 0)
                    {
                        MenuName = dt1.Rows[0]["MenuName"].ToString();
                        GV_MenuContentList.DataSource = dt.DefaultView;
                        GV_MenuContentList.DataBind();
                    }
                    else
                    {
                        MenuName = dt1.Rows[0]["MenuName"].ToString();
                        GV_MenuContentList.DataSource = null;
                        GV_MenuContentList.DataBind();
                    }
                }
                else
                {
                    GV_MenuContentList.DataSource = null;
                    GV_MenuContentList.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
 protected void GV_MenuContentList_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GV_MenuContentList.PageIndex = e.NewPageIndex;
     GV_MenuContentList.DataBind();
     BindGridView();
 }