Mahender,
To make it clear, let’s make it more specific, say there is no column in my states shape file, and there are whole bunch of columns like “Name”, “Pop”, “Area” in my SQL database, so
1, if I want to display the population in plain text, I need to hook up the CustomColumnFetch event and use that “Pop” field directly in my text style. In the event handler method, I need to get the corresponding field by Feature.ID from the sql database and set it to e.ColumnValue. (See samples -> Feature Layers ->AddMyOwnCustomDataToAFeatureLayer)
2, if I want to display the population using a bar or pie graph, I need to hook up both the CustomColumnFetch and ZedGraphDrawing events, use the property zedGraphStyle.RequiredColumnNames.Add(“Pop”) just like that column exists in my shape file; in the CustomColumnFetch handler method, I get the real data from SQL database and set it to features, like what the 1st scenario does.
Here is a sample for the second scenario (I didn’t connect to a Sql database, just change the data artificially in the CustomColumnFetch handler method), please let me know any queries.
Thanks,
Ben
305-ShowBarsWithCustomData.zip (13.6 KB)