I have a project based on SDK Example Project “SensorMonitor”,
How can i set the order of my sensors?
I have a project based on SDK Example Project “SensorMonitor”,
How can i set the order of my sensors?
In the Management Client the sort order is alphabetical and ascending.
In the Smart Client, as the sample is implemented, the Items will be sort by age, the Item created first will be the top. This is fortunately only the default and you can set an order fitting your preferences. I did the experiment and changed one line of code in the sample. (SensorMonitorSensorItemManager.cs, GetItems(), line 334)
List<Item> items = Configuration.Instance.GetItemConfigurations(SensorMonitorDefinition.SensorMonitorPluginId, null, _kind).Select(i => (Item)new SensorItem(i)).OrderByDescending(x => x.Name).ToList();
After this change I observed that when I add an Item to a Map the Element selector presented the items in reverse alphabetical order.