There are several articles describing how to get the underlying datarow but they use a for loop to compare the name/value pairs (which maybe misleading). Is there a solid way to get the columnname of the data clicked?
Hello Murat,
I am attaching a sample where you would be able to get the mapping to the current hierarchy of the data in the desired clicked event.
In order to get the column captions in the same event, I think that you would have to map them to the real values from the data table if you need to use them.
You could use this sample as a base pointer for what you are looking for.
Please let me know if you have any other questions.
Hello Danko
First, thank you very much for your commitment on this subject. As for the answer, the dataset does not change frequently, actually after I've filled the table, nothing happens until user change the criteria - which is fine for me.
I'd be glad if you create a sample.
Regards
Murat
Hello,
Since there is nothing built in for what you are looking for, there might be a way to achieve it, but it would be not very easy to implement.
The approach would include creating a separate dataTable, that contains row and column labels for mapping the hierarchy from your real dataTable.
After that would have to create TreeMapSeries object that contains TreeMapDataPoints and add them to the series object.
I am not sure if you would like such approach, since you have that you are already aware of it, but if you do, I will create sample based on that, but this would require additional work if that data is freaquently changed.
Thank you for the provided information.
I will create a small sample based on your information and will update you once I have mode details about the requested behavior.
It's a plain dataset operation. Like this:
dim sqlConn as new SqlConnection("connection string to a database")dim sqlDa as new SqlDataAdapter("Select UserName, ComputerName, Count(*) from aTable Group by UserName, ComputerName", sqlConn)dim dt as new DataTablesqlDa.Fill(dt)
UltraChart1.DataSource=dt
I can provide you a sample solution but it just contains the above code in Form.Load.
After the chart is rendered, I want to know whether the clicked data was a "UserName" or "ComputerName" so that I can drill down using a different chart/dataset
Please let me know if you need more information