I have created a custom column TComboColumn = class(FMX.Grid.TColumn) for TGrid. Currently I have to add this column to grids in the code, but I would like to be able to do this using the TGrid items designer, like I can when adding default column types (TColumn, TStringColumn, TCheckColumn etc).
Possibly Tools API doesn't provide support...
Possible decision: to write and register own component editor (from TComponentEditor).
The report of this problem on QC: http://qc.embarcadero.com/wc/qcmain.aspx?d=107177
Related
I am trying to customize a work item template and need to add a field which can capture hierarchical data.I am using TFS power tools to edit work items. I tried to create a new field with datatype as TreePath but when I save it, it throws an error:
TF26179 – Field Type 'TreePath' can be used only with System.AreaPath & System.IterationPath
Is there any workaround to use the TreePath control for custom fields?
This should be duplicated with this thread : TFS 2013: Custom TreePath Fields.
Just as the error message mentioned the Field Type 'TreePath' can be used only with System.AreaPath & System.IterationPath.
So, Tree Path is not supported for other fields for now, and there is a user voice submitted to request the feature, you can vote it or submit a new user voice to suggest the feature.
For custom control, you can reference the source code of the vsts-extension-color-control
You can't create a new field with TreePath data type, but you can create custom controls for other data types, so you can create custom controls that display hierarchical information as long as you are able to represent this in an existing data type, in practice the String type.
Examples of custom controls at https://witcustomcontrols.codeplex.com/.
Javve's List.js is nice component but there are difficulties to drop items into - you can't just add item with your html, you should add it through List API using json class and then component will create item for you using its template (loosing all attributes values since it is impossible using this template set up attributes)....
Could you recommend any other list component (with filter and paging to which would be easy to drop items)?
P.S If you know how to drop into list.js - please tell me the secret.
P.P.S It is possible to drug from list.js (so if you do not need to return item to list this component works well)
I am using these components:
UniDac for connection to mysql database
DevExpress for QuantumGrid
IDE:
Embarcadero Rad Studio XE2
I have a cxGrid component with one level and a cxGrid1DBTableView specified as the level's View. I can get data from my database and edit it in the grid. I want to add a column that is not in the bound DataSet. When I specify the Column properties value as CheckBox I can see the column but I can't change the value from unchecked to checked by clicking it. The field doesn't have a DataBinding assigned to it. I tried other types of Properties but all are the same I cant change the row value in the grid.
I've been searching for a way to fix this for couple of days, so im hoping you guys can help me.
Are you trying to add a checkbox item that does not have a database field behind it? I have this on one of my forms.
In addition to setting the Properties to "Checkbox" you need to set the DataBinding -> ValueType to "Boolean". The DataBinding->FieldName can be left blank.
To access the values or change their defaults you can use the DataController like this:
View.DataController.Values[i, CheckBoxFieldIndex] := true;
In addition you need to set
DataController.DataModeController.SmartRefresh := true;
To set that option you will also need a KeyField defined for the Controller (DataController.KeyFieldNames)
Setting the SmartRefresh to true will prevent the grid from trying to get an updated value from the underlying dataset. You need to prevent the refresh or the value for the non-bound column will be set back to Null. This comes with some restriction on how you update your dataset. Any changes made to the data in code will not be reflected by the grid unless you explicitly refresh the grid.
You also have to fill the field View.DataController.KeyFieldNames with one of the datasets fields. At least I need it in Delphi 7.
The TcxRadioGroup component of DevExpress has a very nice way to specify items. You can specify a Caption and a Value (and a Tag) for each TcxRadioGroupItem.
The TcxComboBox and the normal TComboBox of Delphi on the other hand use TStrings to store its items.
While TStrings can have a Name and an Object, there is no easy way to hook up a name and a value using the form designer of the Delphi IDE.
Is there a ComboBox control (preferably from DevExpress) that allows to visually design its items with a Caption and a Value?
PS: I'm not looking for a DB aware control.
Try a TcxImageComboBox. See here - you don't have to assign images despite the name. You can also edit the items visually.
(I use it as cell editor in cxGrids because of the separation Description/Value.)
Raize Components have TRzComboBox which introduces a Values property as an addition to the existing Items.
ESBPCS for VCL has an enhanced Lookup ComboBox. It stores 2 Lists, the ones normally in TCombobox's Items as well as the new Values list. These two StringLists are in a 1-1 relationship. Use AsItem to retrieve the string currently displayed and AsValue to retrieve the "related" string from Values.
Use a standard Delphi TComboBox, it can store a string (for visualization, and an object of any TObject descendant that you implement yourself, i.e you can store anything associated to a string in the dropdown).
In my application I have a TcxGrid (devexpress datagrid) that displays the data returned from a stored procedure.
Now I would like to add a column showing checkboxes from which the values cannot come from the database but are calculated internally.
When the checkboxes are clicked, some internal logic needs to be triggered.
Any suggestions?
#boris, I recommend you use the Support Center site of DevExpress for this type of question, there are thousands of articles to DevExpress products.
Anyway I leave here a link to something that might help ;)
How to set up an unbound item in a data-aware View
Are you creating the view at runtime or at designtime?
I sort of cheated when I did this at runtime, and returned a static value as one column from my query:
select false as processed,col1,col2 from table where true
I could then safely attach the dataset, and I had my new column to play with.
You would then perhaps use the properties.onChange or properties.onEditValueChanged for your logic code.