Comments on: Windows DataGridView – Improving the Data Display (Refresh) Performance https://www.anujvarma.com/windows-datagridview-improving-the-data-display-refresh-performance/ Production Grade Technical Solutions | Data Encryption and Public Cloud Expert Sun, 04 Nov 2012 17:15:50 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Lacey https://www.anujvarma.com/windows-datagridview-improving-the-data-display-refresh-performance/#comment-211 Sun, 04 Nov 2012 17:15:50 +0000 http://www.anujvarma.com/windows-datagridview-improving-the-data-display-refresh-performance/#comment-211 I actually maanegd to sort this out, and this is how I did it for an un-bound datagridview in a win forms project VB2008Express. Private Sub DataGridView1_SortCompare(ByVal sender As Object, ByVal e As DataGridViewSortCompareEventArgs) Handles DataGridView1.SortCompare If e.Column.Index = 0 Then Dim DateValue1, DateValue2 As Date If Not Date.TryParse(e.CellValue1.ToString, DateValue1) Then Return If Not Date.TryParse(e.CellValue2.ToString, DateValue2) Then Return If DateValue1 = DateValue2 Then e.SortResult = 0 ElseIf DateValue2 DateValue1 Then e.SortResult = -1 Else e.SortResult = 1 End If End If e.Handled = True End SubI then call the routine from within one of my subs that loads data like so: sort routine before loading comboboxes Dim newcolumn As DataGridViewColumn = DataGridView1.Columns(0) Dim direction As ListSortDirection direction = ListSortDirection.Ascending DataGridView1.Sort(newcolumn, direction)I am posting it here in the hope that like me, if some-one needs it as desperately as I did, they can have access to it. Also, if this code is not as efficient as can be, I am hoping someone can refine it for our good use!thanks again for providing the forum and the spark!

]]>
By: roby https://www.anujvarma.com/windows-datagridview-improving-the-data-display-refresh-performance/#comment-183 Mon, 26 Mar 2012 12:52:14 +0000 http://www.anujvarma.com/windows-datagridview-improving-the-data-display-refresh-performance/#comment-183 very helpful article, specially for performance. dapfor .net grid also provide powerful performance control. http://www.dapfor.com/en/net-suite/net-grid/features/performance

]]>