Example #1
0
        /// <summary>
        /// Used to bind data source to gridview when page first load
        /// </summary>
        private void BindChecklistMode()
        {
            try
            {
                Masters   objChecklist     = new Masters();
                DataTable dtChecklistModes = objChecklist.GetChecklistModeList();

                SessionChecklistModeData = dtChecklistModes;

                //DataColumn[] keycol = new DataColumn[1];
                //keycol[0] = SessionChecklistModeData.Columns["ToDoItemId"];
                //SessionChecklistModeData.PrimaryKey = keycol;

                gridView.DataSource = SessionChecklistModeData;
                gridView.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }