Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWjQGrid get value from Grid
#1
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;
Reply
#2
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.
Reply
#3
Wink 
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;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)