public void FindInGridControl(string _CodeCient) { for (int index = 0; index < GvLicence.RowCount; index++) { if (GvLicence.GetRowCellValue(index, ClientCode).ToString() == _CodeCient) { GvLicence.FocusedRowHandle = index; GvLicence.SetRowCellValue(index, ClientCode, _CodeCient); return; } } MsgBox.Show(this, "Not Found"); }
private void CodeClient_KeyUp(object sender, KeyEventArgs e) { for (int index = 0; index < GvLicence.RowCount; index++) { if (GvLicence.GetRowCellValue(index, ClientCode).ToString() == CodeClient.Text) { GvLicence.FocusedRowHandle = index; GvLicence.SetRowCellValue(index, ClientCode, CodeClient.Text); IsLicenced = DetailsRepository.DefractionnerObjetReaderClient(ProgramManager.RecupDataClient(CodeClient.Text), PicLicence1, PicLicence2, PicLicence3, NomClient, CodePostale, VilleClient, Adresse1, Adresse2, GropLicences); return; } } GvLicence.MoveFirst(); }