Atozed Forums
IWjQGrid get value from Grid - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: IWjQGrid get value from Grid (/thread-3952.html)



IWjQGrid get value from Grid - medzoom - 03-15-2024

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;



RE: IWjQGrid get value from Grid - joergb - 03-15-2024

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.


RE: IWjQGrid get value from Grid - medzoom - 03-18-2024

than joergb

I needed to switch off the virtualMode before connecting to cell[1,1] Smile

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;