I have a data grid view populated by a query, how would I go about getting the mode from a column of values in the data grid view (from the queried data) Thanks in advance.

Can you please explain in detail..?

Sure, I have a list of numbers in a data grid view, they are two sets of ID's, I would like to be able to get the Mode (as in most occurring number) from the second column of numbers. As it's already queried data which is filling the table, how do I query it to find the mode?

Still im not getting ur question. what you mean by MODE?

Most occurring number??
As in mode, median mean?

I want to get the value which appears the most times in that second column

In Query it self you can try something like this?

select count(ColumnName) from Table
group by ColumnName
having Count(ColumnName)>0

No as the query has already been ran on the dataset, it's the queried data that im trying to get the number from.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.