I am using a tree with the connector & dataProcessor. Everything is working successfully when I set the RootItemRelationIDValue = 0 in the connector and update my database to have 0 as the default ParentID value. However I would prefer to use NULL as the default value. So I removed this line
connector.RootItemRelationIDValue = “0”;
in my config and updated my database to have NULL as the default ( root level ) parent id.
This worked fine and renders the tree correctly, but when updating items via the dataProcessor it sets the Parent ID to 0 instead of null
Here is the logger output :
04:13:45 PM DataRequest: Extracted values are: [ ParentSRID = 0,Description = Implement Password Change and Application Users]
TeamWrxWeb.Handlers.TreeDataHandler: DEBUG - Action - > Updated
04:13:45 PM DataRequest: Executing update action.
04:13:45 PM MSSQLAdapter: Entering: ExecuteUpdateQuery
04:13:45 PM MSSQLAdapter: Creating UpdateQuery from TableName: [wrx_Campaigns].[dbo].[ut_ServiceRequests], Fields-Values: ParentSRID = 0, Description = Implement Password Change and Application Users, Status = 478, PrimaryKeyField: ServicerequestID, PrimaryKeyValue: 172
04:13:45 PM MSSQLAdapter: Update query: UPDATE [wrx_Campaigns].[dbo].[ut_ServiceRequests] SET ParentSRID = ‘0’, Description = ‘Implement Password Change and Application Users’, Status = ‘478’ WHERE ServicerequestID = ‘172’
04:13:45 PM MSSQLAdapter: Leaving: ExecuteUpdateQuery
this executes perfectly well but when I refresh my tree this item is no longer visible as it’s parentID is now 0 and not NULL.
According to documentation “In hierarchical data structures sometimes appear the question: what value should be used for indicating the top (root) item. dhtmlxTree(Grid)Connector assumes that the root item’s ParentID value is null”
I am using the .Net Connector and the latest PRO edition which I am still evaluating.
I could probably attach an event and update the value from 0 to NULL but I don’t think that would be the correct fix? Any Suggestions?