MoonchildHK
Programmer
Hi All,
I am using a TStringGrid in a progra, with one fixed row and no fixed columns. When I write to the 3nd row of the grid, the program unexpectly terminates? I can't figure out any reason.. no errors, no exxceptions, nothing. Just quits!
I have ensured there are enough rows to write to, and it worked for a while, then it suddenly stopped working!
Here is the code I am using to write to the grid:
(Where sgRequests is the StringGrid, lRequests is a TList, and tempRequest is a structure I defined myself)
tempRequest->girlID, memberID and id are INT types;
tempRequest->girlName and memberName are CHAR * types;
Any help or ideas would be much appreciated.
Thanks,
I am using a TStringGrid in a progra, with one fixed row and no fixed columns. When I write to the 3nd row of the grid, the program unexpectly terminates? I can't figure out any reason.. no errors, no exxceptions, nothing. Just quits!
I have ensured there are enough rows to write to, and it worked for a while, then it suddenly stopped working!
Here is the code I am using to write to the grid:
(Where sgRequests is the StringGrid, lRequests is a TList, and tempRequest is a structure I defined myself)
Code:
sgRequests->RowCount = lRequests->Count+1;
sgRequests->Cells[4][lRequests->Count] = IntToStr(tempRequest->memberID);
sgRequests->Cells[3][lRequests->Count] = tempRequest->memberName;
sgRequests->Cells[2][lRequests->Count] = IntToStr(tempRequest->girlID);
sgRequests->Cells[1][lRequests->Count] = tempRequest->girlName;
sgRequests->Cells[0][lRequests->Count] = IntToStr(tempRequest->id);
tempRequest->girlID, memberID and id are INT types;
tempRequest->girlName and memberName are CHAR * types;
Any help or ideas would be much appreciated.
Thanks,