StringGrid issue in Delphi XE8 firemonkey mobile app
I'm using Delphi XE8 for developing mobile application and I'm facing some of the problem in TStringGrid.
Showmessage(StringGrid.Cells[0, ARow]);
And this shows the proper value of the selected row at the first time. But when I have tried to click again the selected row, this event is not getting fired. And I cant able to unselect the particular row.
So, I have tried to write this message in OnClick event.
var iRowInd: Integer; begin iRowInd := StringGrid1.Selected; ShowMessage(StringGrid.Cells[0, iRowInd]); end;
And this is not working at the first time of the click and when I clicked for the second time it works properly. This issue is only in android mobile and not in Windows.
Please provide me some solution. And Thanks in Advance.
Let's do this with OnClick event:
procedure TfmMain.StringGrid1Click(Sender: TObject);
begin
Caption := 'Selected ROW ID: ' + StringGrid1.Selected.ToString + '. Selected COLUMN ID: ' + StringGrid1.ColumnIndex.ToString + '. Action at: ' + DateTimeToStr(Now);
end;
property TStringGrid.Selected will return ROW ID (Starting from Zero)
and
property TStringGrid.ColumnIndex will return COLUMN ID (Starting from Zero)
As of now, I have used the Material Design in the Form. And first the user needs to Select the Grid. Then, the user needs to click the button and after that I'm proceeding my logic. This makes the good application GUI and makes the functionality also proper.
链接地址: http://www.djcxy.com/p/50638.html