문제

I need to sort a DataTable or DataGridView by a column that is a string value, but with null/empty values at the BOTTOM when sorting ASCENDING.

The DataTable is NOT populated by a SQL statement, so no order by.

If I do

DataGridView1.Sort(New RowComparer(System.ComponentModel.ListSortDirection.Ascending))

then it throws an exception, saying that the DataGridView is DataBound, which is correct, but doesn't help me, and I want to keep it databound.

It's .NET 2.0, which means no LINQ available!

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top