Displaying Tabular Data In A WinForm?
I started with using a TableLayoutPanel, but when I have big tables, they are extremely sluggish. I'm looking for the responsiveness of an HTML table to display my data in.
The only solution I currently have is to have my WinForm write and HTML table, a开发者_如何学Gond display it in an embedded browser. This obviously is a huge workaround, and I'd rather implement a more clean and straightforward solution.
If you have any suggestions, please fire away. (a ListView will not work for what I'm trying to do)
What about using a DataGridView
, or if you have DevExpress, a XtraGridControl
? TableLayoutPanel is designed for laying out controls as far as I know, not for presenting data.
On the other hand, if your data set grows as large that your tables become sluggish, you might want to narrow down your data, e.g. by filtering or by introducing paging, one page only displaying 50 items or so.
Paging as well as filtering, in turn, is supported at least by XtraGrid
, not sure about Microsoft's DataGridView
.
You definitely need either a grid or a report, depends on what you want.
Highly customizable grid controls (like Infragistics or DevExpress) allow you to make almost any appearance you need. Users will have no idea they look at grid control.
精彩评论