@Primer , Welcome to Microsoft Q&A, you could try the following code to filter the condidtion that values start with 25.
foreach (var item in result)
{
if(item.Value.StartsWith("25"))
{
dataGridView2.Rows.Add(count, item.Value, item.Count);
count++;
}
}
Result:
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.