Search the Community
Showing results for tags 'tstringgrid'.
Found 3 results
-
When TStringGrid or TDrawGrid is read only (goEditing off), than I see issues with the keyboard. If there is somewhere e.g. label with Caption="&Word Wrap", than when grid is focused and I press "W", the action Alt+W is triggered without me pressing Alt. This is super easy to replicate, can someone comment what is going on? And how to fix it or mitigate? Reagrds, Piotr
- 1 reply
-
- tstringgrid
- tdrawgrid
-
(and 1 more)
Tagged with:
-
I have a TFDQuery that returns a row from record. When binding it visually to TStringGrid is it possible to invert it, so the field names are displayed in rows and values in columns? I would like to do the same for TFDTable when visually binding it to TStringGrid. Id | Name | Role Id | 1 | 2 1 | John | admin -> Name | John | Jane 2 | Jane | user Role | admin | user
-
Type THelpModel = Class(TGridModel); procedure TViewPart.ChangeStringGridComboBoxCurrency(Sender: TObject); begin with TComboBox(Sender), StringGridPartDet do begin THelpModel(StringGridPartDet.Columns[2].Model).DoSetValue(Col,Row, TValue.From<String>(Items[ItemIndex]) ); StringGridPartDet.Columns[2].UpdateCell(Row); end; end; procedure TViewPart.StringGridPartDetCreateCustomEditor(Sender: TObject; const Column: TColumn; var Control: TStyledControl); begin if Column = StringGridPartDet.Columns[2] then begin Control := TComboBox.Create(Self); TComboBox(Control).Items.AddStrings(['GBP', 'EUR']); With StringGridPartDet, TComboBox(Control) do ItemIndex := Items.IndexOf(THelpModel(StringGridPartDet.Columns[2].Model).DoGetValue(Col,Row).AsString); TComboBox(Control).OnChange:= ChangeStringGridComboBoxCurrency; end; end; I have a StringGrid (StringGridPartDet) connected to a DataSet, I have used the attached code to update the currency column with a value from a ComboBox, the value appears correctly in the StringGrid, but does not update the DataSet. AmI missing a step?
- 4 replies
-
- tstringgrid
- fmx
-
(and 4 more)
Tagged with: