|
<< Click to Display Table of Contents >> Navigation: Forum > IWjQGrid get value from Grid |
03-15-2024, 02:01 PM:
I didnt find a solution in the demo-file, but how do I read the value of an consisting jQGrid?
I try to react to a doubleClick, first .cell[1,1]-call raises an exception and second .DoGridGetCell(..)-call gives a empty string back?
In the TMS-Sourcecode the is an function .cells but with IntraWeb there isn't?
Code:
procedure TIWFrame1.IWjQGrid1AsyncDblClickRow(Sender: TObject;
EventParams: TStringList; const RowID: string; const Row, Col: Integer);
var
text1, text2, text3 : string;
begin
text3 := IWjQGrid1.Columns[1].DisplayName;
text1 := IWjQGrid1.Cell[1,1];
text2 := IWjQGrid1.DoGridGetCell(RowID, 'Column1');
end;
03-15-2024, 10:10 PM:
Hey
the first one worked for me.
grid->Cell[row][col] ...
the first index is the row , the second the column, and grid->Cell[0][0] points to the first Data Cell.
You have to ignore any fixed Header Rows or Cols.
03-18-2024, 03:58 PM:
than joergb
I needed to switch off the virtualMode before connecting to cell[1,1] ![]()
this code works well for me.
Code:
procedure TIWFrame1.IWjQGrid1AsyncDblClickRow(Sender: TObject;
EventParams: TStringList; const RowID: string; const Row, Col: Integer);
var
text1 : string;
begin
IWjQGrid1.VirtualMode := false;
text1 := IWjQGrid1.Cell[1,1];
IWjQGrid1.VirtualMode := true;
end;