Exemplo n.º 1
0
        private void FxData()
        {
            ObjDt = null;

            GrdData.DataSource = null;

            GrdData.Enabled = false;

            CmdEdit.Enabled = false;

            ObjDt = ClsSqlAdministrator.Fx_sel_tblModule(false);

            if (ObjDt != null)
            {
                if (ObjDt.Rows.Count > 0)
                {
                    GrdData.DataSource = ObjDt.DefaultView;

                    GrdData.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

                    GrdData.Columns[1].DefaultCellStyle.WrapMode = DataGridViewTriState.True;

                    GrdData.Columns[4].Visible = false;

                    GrdData.Enabled = true;

                    GrdData.Enabled = true;

                    CmdEdit.Enabled = true;

                    GrdData.Focus();
                }
            }
        }