Hello,
I try configure an TTMSFMXLiveGrid when I LiveBinding with an TDataSet.
I dont know:
- how to identify field with which column is binding.
- how to hide columns in according with fields that have Visible:=false
- how to align content of the numeric fields to the right. I try to set
grdMain.Columns.HorzAlignment := TTextAlign.Trailing;
but content is still align to the left.
Best regards,
Tiberiu Stoicescu
Hi,
-You can identify which column is binding by simply using the column index and use the Fields property of the DataSet. Please note that adding a FixedColumn affects the column index (Fixed column typically does not display data so the first column / field start at index 1 by default.
-column hiding is not supported in combination with an active LiveBindings. There are 2 options: either write a query that only displays the fields you want. Or use the LoadAllDataAndDisconnect method and then manually hide the column. You will loose the connection when choosing option 2.
- Alignment and all other cell layout related settings can be configured through the OnGetCellLayout event.