Recent

Author Topic: Android | jGridView | Bug  (Read 1514 times)

cpalx

  • Hero Member
  • *****
  • Posts: 753
Android | jGridView | Bug
« on: December 18, 2018, 10:05:28 pm »
Hello i have a jGridView, showing data correctly , i want display text when i "click" any cell, but i need always the first column. Tried: 
Code: Pascal  [Select][+][-]
  1. jgView.Cells[ iCol, iRow ] + LineEnding
but (and i think is the bug) show me correctly the thwo fisrt rows, all below it display empty.

Any idea?

Code: Pascal  [Select][+][-]
  1.            
  2.             BufDataset1.First;
  3.             iRow:= 0;
  4.             with BufDataset1 do
  5.             while not EOF do begin
  6.                 jgView.Cells[ 0, iRow ]:=  FieldByName( 'seexid' ).AsString;
  7.                 jgView.Cells[ 1, iRow ]:=  FieldByName( 'product' ).AsString;
  8.                 iRow:= iRow + 1;
  9.                 Next;
  10.             end;  
  11.  


Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.jgViewClickItem(Sender: TObject;
  2.   ItemIndex: integer; itemCaption: string);
  3. var iRow, iCol: Integer;
  4. begin
  5.   jgView.IndexToCoord( ItemIndex, iCol, iRow );
  6.   ShowMessage( 'Columna= ' + IntToStr( iCol ) + ': ' + 'Fila= '+ IntToStr( iRow )  + LineEnding +
  7.                jgView.Cells[ iCol, iRow ] + LineEnding +
  8.                itemCaption);
  9.  
  10.   jtxtProductSelected.Text:= jgView.Cells[ iCol, iRow ];
  11.  
  12. end;  

 

TinyPortal © 2005-2018