locked
.Net 4.0 DataGridView performance improvements from previous versions RRS feed

  • Question

  • Would like to take a very large WinForms project in .Net 2.0 to .Net 4.0

    We are using regular WinForms DataGridView. Are there performance improvements for handling large collections in DataGridView in .Net 4.0 that I cant take a look at.


    • Moved by Kristin Xie Wednesday, October 7, 2015 2:58 AM more related to winform control
    Tuesday, October 6, 2015 3:34 PM

Answers

  • The best way to do this is for you to create a sample of a DataGridView in virtual mode to demo to your team. In short this is really no different than a web application that does paging no different than how even these forums work. Virtual mode requires more effort for a developer but when there is a large data set and no choice to reduce the size of the data this is the best option. Many developers don't use virtual mode because normally in apps the average requirement is not needing to show a massive dataset but instead offer methods to filter data then display said data in the user interface.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.
    Microsoft Developer tools
    Developer’s Guide to Windows 10 video series

    • Marked as answer by Boris Kleynbok Thursday, October 8, 2015 1:11 PM
    Thursday, October 8, 2015 10:11 AM
  • It is pretty rare that a user actually wants thousands of records.

    For the simple reason that they cannot read that many in any practical time period.

    Personally, I feel any performance increases from virtualisation ought to be academic.

    There should always be some filtering by way of a treeview or combobox or search with default options or SOMETHING which limits the amount of data the user has to look at in a collection to below 300 records.

    200 to 300 is the considered maximum that UI usability studies come up with.

    Anyhow.

    I would not be using virtualisation of a datagrid as a reason to move to .net 4.

    As a some time manager, one significant reason is that staff want to remain current. Use old versions of software and you risk people leaving.

    LINQ is very useful. Perhaps surprisingly so if you're new to it.


    Hope that helps.

    Technet articles: WPF: MVVM Step 1; All my Technet Articles

    • Marked as answer by Boris Kleynbok Thursday, October 8, 2015 1:11 PM
    Thursday, October 8, 2015 11:49 AM

All replies

  • Hello,

    Please review virtual mode for the DataGridView

    https://msdn.microsoft.com/en-us/library/ms171622(v=vs.110).aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.
    Microsoft Developer tools
    Developer’s Guide to Windows 10 video series

    Tuesday, October 6, 2015 9:04 PM
  • I know all the compelling reasons to move to .Net 4.0 +

    In order to convince my team I would like to see how DataGridView performs in .Net 4.0 compared to older versions to make more persuasive argument.


    BK


    Wednesday, October 7, 2015 2:17 PM
  • The best way to do this is for you to create a sample of a DataGridView in virtual mode to demo to your team. In short this is really no different than a web application that does paging no different than how even these forums work. Virtual mode requires more effort for a developer but when there is a large data set and no choice to reduce the size of the data this is the best option. Many developers don't use virtual mode because normally in apps the average requirement is not needing to show a massive dataset but instead offer methods to filter data then display said data in the user interface.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.
    Microsoft Developer tools
    Developer’s Guide to Windows 10 video series

    • Marked as answer by Boris Kleynbok Thursday, October 8, 2015 1:11 PM
    Thursday, October 8, 2015 10:11 AM
  • It is pretty rare that a user actually wants thousands of records.

    For the simple reason that they cannot read that many in any practical time period.

    Personally, I feel any performance increases from virtualisation ought to be academic.

    There should always be some filtering by way of a treeview or combobox or search with default options or SOMETHING which limits the amount of data the user has to look at in a collection to below 300 records.

    200 to 300 is the considered maximum that UI usability studies come up with.

    Anyhow.

    I would not be using virtualisation of a datagrid as a reason to move to .net 4.

    As a some time manager, one significant reason is that staff want to remain current. Use old versions of software and you risk people leaving.

    LINQ is very useful. Perhaps surprisingly so if you're new to it.


    Hope that helps.

    Technet articles: WPF: MVVM Step 1; All my Technet Articles

    • Marked as answer by Boris Kleynbok Thursday, October 8, 2015 1:11 PM
    Thursday, October 8, 2015 11:49 AM