Dear, I have a problem, I am new to delphi and I want to go through a StirngGrid also a TDBGrid, I would like some suggestion. I am developing a client - server application (DataSnap), but I am not able to reccure the STringGrid, I want to develop my own menu to go through the Grid. I've been stuck in this for two days now.
Edited ..
Now I have this problem ..
procedure TForm5.SpeedButton3Click(Sender: TObject);
var I : integer;
var J : integer;
var Str : String;
var client : TTServerMethodsClient;
begin
client := TTServerMethodsClient.Create(SQLConProductosGrid.DBXConnection);
// Recorrido por las filas
for I := 0 to (StringGridBindSourceDB1.RowCount - 1) do begin
// Recorrido por las columnas
for J := 0 to (StringGridBindSourceDB1.ColCount - 1) do begin
// Acceso a cada celda
Str := StringGridBindSourceDB1.Cells[J,I];
showMessage('Acceso a la celda :'+Str);
end;
end;
end;
procedure TForm5.StringGridBindSourceDB1SelectCell(Sender: TObject; ACol,
ARow: Integer; var CanSelect: Boolean);
begin
showMessage('Acceso a la celda');
BindSourceDB1.DataSet.Open;
BindSourceDB1.DataSet.DisableControls;
BindSourceDB1.DataSet.Edit;
BindSourceDB1.DataSet.Post;
BindSourceDB1.DataSet.EnableControls;
end;
When I want to access the cell in the TStrinGrid it tells me this error:
Cannot Modify a Real-Only DataSet