Share via


DataGridView FAQ now posted

As promised: here's the link to the DataGridView FAQ. There's also a set of demo applications.

There are whole bunch more FAQs up on Windows Forms.NET with quite a bit of good info in them. 

<shameless ask for plug>
Please check the FAQs out if you're thinking of using Windows Forms 2.0 -if it's useful, link to it so others can find them too!
</shameless ask for plug>

Thanks! =)

Comments

  • Anonymous
    November 16, 2005
    Hi jfo,
    I downloaded the samples and the FAQ document. This grid is really cool. Thank you very much.

    I also have some questions for you.

    First, does the DataGridView allow ordering by multiple columns? For example, if I want to order columns first by Name, then by City, then by Locality etc, can I do that with DataGridView?

    Second, does it allow grouping of columns? I've seen this in the Infragistics grid, wherein you drag a column to an area above it and the view changes to a list collapsible rows, and each row has the grouped column name and the group item as its caption. Is this possible?

    Third, I saw some comments at this link that say the DataGridView is very slow. Could you please share your thoughts on this? Here is the link:
    http://weblogs.asp.net/fbouma/archive/2005/10/29/428848.aspx

    We are in the process of evaluating different options for our project, and your inputs would help us a lot.

    Thanks and Regards,
    Girish
  • Anonymous
    November 16, 2005
    Good questions - lemme find out from the DGV people.
  • Anonymous
    November 17, 2005
    Regis sent back a good chunk of information - I've posted his response here:

    http://blogs.msdn.com/jfoscoding/articles/494012.aspx
  • Anonymous
    November 17, 2005
    Thanks very much, Jessica. This helped a lot. I will let you know if I need any other information.

    Girish
  • Anonymous
    November 29, 2005
    This is a great FAQ. I'm curious, why would they make the Alternating Style override the DataGridViewColumn.DefaultCellStyle? It seems like that should be an underlying style more like DataGridView.DefaultCellStyle.
  • Anonymous
    November 29, 2005
    Jessica I have one more question for you. What do you think about SuspendLayout and ResumeLayout? I notice your FAQ doesn't mention those two methods. Will they help performance? I'm trying to optimize my DGV's as much as possible, but the ones with 500+ rows and approx 10 to 20 columns are very slow. Unfortunatly the ones with many rows are also the ones that I have to perform custom styles on cells based on DB values (ex: disable certain cells, so i set the style backcolor and forecolor to lightgray/darkgray). I can practically see each row get generated then after each row is added, i format the styles and you can see each style get applied. I'm trying to speed this up as much as possible and your FAQ is definitely a big help.
  • Anonymous
    November 29, 2005
    The comment has been removed
  • Anonymous
    December 01, 2005
    Thanks Jessica. Your response was very helpful. I just finished implementing the CellFormatting event (which I learned about from your FAQ) for doing individual styles. Before I was just looping through the rows and setting the styles, after the datasource got set. It has improved the speed significantly on my grids with lots of rows. It has slowed down my smaller grids slightly, but it was definitely worth it.

    Do you happen to know if there's anyway to cache the styles or something after they get initially set by the CellFormatting event, so that they don't have to get redrawn each time? If not, it's not biggy. I appreciate all the help.

    Thanks again.
    -Adam
  • Anonymous
    December 01, 2005
    Lets continue this thread on the forums:
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=154156&SiteID=1

    This way I can have the DGV people directly answer your questions.
  • Anonymous
    January 17, 2009
    PingBack from http://www.hilpers.it/2714647-datagrid