I'm not sure I understand the interest of the event "FeatureSource.CustomColumnFetch" to apply a ClassBreakStyle on business data from SQL Database.
In my case, the shapefile contains approximately 10,000 features, the business data concern only 100 features spread over the entire shapefile.
It seems to me "CustomColumnFetch" is fired for each feature to display (10,000 times in the first display, if fullextent), then each refresh (zoom in / out, ...) as many times as features to display. Which is not very fluid.
Is there another way to do it? with InMemoryFeatureLayer to create a column to store business data (100 features) and apply the style based on the value of the layer column, only one time ?
This geographical analysis, for which the user queries the data in a database, involve 100 features (among the 10000 possible) in the shapefile, which are not known in advance and change each user request.
Thus, it is not possible to provide a split or an index in advance
I found that the method using the event CustomColumnFetch works at each refresh, by looping through each feature of the shapefile, to populate the ColumnValue to be considered for the display of style.
In my case, it seemed to me more efficient, to reverse the logic by looping over the 100 datatable rows resulting of the user's query, only to draw the style of the features involved (and only one time, not at each refresh).
So I am looking for a sample in order to create an InMemoryFeatureLayer, then create a column in it, populate this column with business data, and apply style on this column.