I am using Virtual TreeView. In my understanding, since the whole treeview is virtual, the node properties(including the check state) are set on request(such as on a OnData event handler) instead of storing together with the node, since the node is total virtual. However, it seems that Virtual TreeView will store the check state of the node together with the node, instead of obtain from external data source and set on request.
Why?
Use the OnBeforeGetCheckState event to handle this in a more virtual manner. The OnChecking and OnChecked event might also be helpful.
Related
I am using Virtual TreeView. It seems that Virtual TreeView will automatically update the node check state when its children check states are changed. Is there a way to prevent this?
Thanks
I have one view which loads some data and needs to pass it to a sibling view. I'm trying to use shared injectable service + Stream add/listen.
I have read https://angular.io/guide/component-interaction#parent-and-children-communicate-via-a-service and many other similar questions but my case is different.
In my case, sibling is not created when I do service.streamController.add and thus, nothing happens when I navigate to sibling, it has listen method but I guess it cannot catch smth published before component started.
In my application there are already many nodes with different labels. We are passing property value at the time of creation. I wanted to have 2 properties for all the nodes by default (like creationDate and createdBy). Is there any possibility from configuration side that we can pass these property by default to all the nodes at the time of creation.
If by configuration, you only mean neo4j.conf, then no. You need some code to actually compute the value of the properties anyway: how do you represent the date, how do you determine who created the node?
To do that, you could deploy an extension in Neo4j to intercept the creation of nodes through transaction events by implementing a TransactionEventHandler: you'll get the TransactionData which directly exposes the nodes that were created, on which you can then set the audit properties you want.
The handler is registered through GraphDatabaseService, which can be obtained at startup by implementing PluginLifecycle and exposing the implementation via the Service Locator mechanism (put the class name in META-INF/services/org.neo4j.server.plugins.PluginLifecycle).
I am working in video application in my application am using many controls for user friendly first i will Load the base from only after that i ll load the other controls based on user need.... here my need is if user load ten controls in this case if he shutdown the machine means when he restart the machine i need to bring the all controls back what he was load the controls before he shutdown. thanks in advance
is there is any possible to achive this without store the current control set, and positions etc..
You need to look at something like
Form and Control Position and Size
Utility
Save and restore Form position and
layout with this component
Basically what it boils down to, is that you need a way to store the current control set, and positions (possibly values too) to some sort of storage (XML file, Registry, Database) when the user exits your form/application.
Then once they reopen the form/application, you need to retrieve these settings for the given user (if any is available) and restore the form/application to that state.
How about making extension methods to Control class?
(Actually, appropriate .NET abstract base class, a sub-class of Control class, depending on UI. Do you use Windows Forms or XAML or ASP.NET?)
Something like:
public static class MyPositionExtensions{
public static void SaveState(this Control c){ /* Save position to xml-file */ }
public static void RestoreState(this Control c){ /* Load from xml-file */ }
}
Then in your closing just loop like
foreach(var c in MyControls)c.SaveState();
and opening like
foreach(var c in MyControls)c.RestoreState();
I need to create an Aggregate Field in a TClientDataSet, but as said in the docs:
Choose OK. The newly defined aggregate
field is automatically added to the
client dataset and its Aggregates
property is automatically updated to
include the appropriate aggregate
specification.
When I add a new aggregate field, the aggregate specification isn't added to the TClientDataSet's Aggregates, therefore I can't use its OnUpdateMethod.
I also tried handling the OnChange event of my new Aggregate Field, but it isn't fired at all.
Am I doing something wrong? I just want to have an aggregated field and fire an event everything it's value change.
Is this broken on delphi? Because what is in the documentation doesn't reflect the actual behavior.
edit:
#Michal Sznajder
I'm using Delphi 2007
I think you may be getting confused between TAggregate and TAggregateField objects, and the Delphi documentation probably isn't helping.
AFAICT, TAggregateField objects are automatically 'recalculated' and can be bound to data-aware controls like TDBText, but don't have any OnUpdate event.
"TAggregate" objects, on the other hand, do have an OnUpdate event, but can't be bound to data-aware controls.
This may be enlightening: http://dn.codegear.com/article/29272
Which version of Delphi ? I just tried clean D7 application and TAggregateField was added.