Carrotware.CMS.UI.Admin.c3_admin.WidgetHistory.BindDataGrid C# (CSharp) Method

BindDataGrid() private method

private BindDataGrid ( ) : void
return void
        private void BindDataGrid()
        {
            var lstW = widgetHelper.GetWidgetVersionHistory(guidWidgetID);
            var current = lstW.Where(x => x.IsLatestVersion == true).FirstOrDefault();

            GeneralUtilities.BindDataBoundControl(gvPages, lstW);

            foreach (GridViewRow dgItem in gvPages.Rows) {
                CheckBox chkContent = (CheckBox)dgItem.FindControl("chkContent");

                if (chkContent.Attributes["value"].ToString() == current.WidgetDataID.ToString()) {
                    chkContent.Visible = false;
                }
            }

            if (lstW.Count < 1) {
                btnRemove.Visible = false;
            }
        }