private void getData() { if (dt != null) { dt.Clear(); } dt = user.getUsers(); refresh(txtCari.Text); }
private void refresh() { disableControl(); dgvUsers.Rows.Clear(); dgvUsers.DataSource = user.getUsers(); for (int a = 0; a < dgvUsers.Columns.Count; a++) { if (a != 1) { dgvUsers.Columns[a].Visible = false; } else { dgvUsers.Columns[a].ReadOnly = true; } dgvUsers.Columns[a].HeaderText = "NAMA USER"; } }