Bonjour,
Je cherche à faire une fonction qui me permettre de rajouter un ligne après celle qui est sélectionnée... Et cela fonctionne parfaitement!! voici mon code :
Mon problème c'est qu'elle n'apparait pas comme vide!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 void __fastcall TForm_Tab_Clients::Ajouteruneligneaprslaligneslectionne1Click( TObject *Sender) { StringGrid->RowCount++; int IndexLigne=StringGrid->Selection.Top; for(int i = StringGrid->RowCount; IndexLigne<i; i--) { StringGrid->Rows[i] = StringGrid->Rows[i-1]; } for(int j = 0; j<StringGrid->ColCount; j++) { StringGrid->Cells[IndexLigne+1][j] = ""; } }
ça fait un moment que je tourne en rond et je n'y arrive pas...
Quelqu'un à une idée du pourquoi?
Merci par avance
Partager