码迷,mamicode.com
首页 > Windows程序 > 详细

DataGridView key Points

时间:2014-08-02 15:14:13      阅读:311      评论:0      收藏:0      [点我收藏+]

标签:des   datagridview   style   http   color   os   io   for   

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview(v=vs.110).aspx

The DataGridView control provides a customizable table for displaying data. The DataGridView class allows customization of cells, rows, columns, and borders through the use of properties such as DefaultCellStyle, ColumnHeadersDefaultCellStyle, CellBorderStyle, and GridColor. For more information, see Basic Formatting and Styling in the Windows Forms DataGridView Control.

You can use a DataGridView control to display data with or without an underlying data source. Without specifying a data source, you can create columns and rows that contain data and add them directly to the DataGridView using the Rows and Columns properties. You can also use the Rows collection to access DataGridViewRow objects and the DataGridViewRow.Cells property to read or write cell values directly. The Item indexer also provides direct access to cells.

As an alternative to populating the control manually, you can set the DataSource and DataMember properties to bind the DataGridView to a data source and automatically populate it with data. For more information, see Displaying Data in the Windows Forms DataGridView Control.

When working with very large amounts of data, you can set the VirtualMode property to true to display a subset of the available data. Virtual mode requires the implementation of a data cache from which the DataGridView control is populated. For more information, see Data Display Modes in the Windows Forms DataGridView Control.

For additional information about the features available in the DataGridView control, see DataGridView Control (Windows Forms). The following table provides direct links to common tasks.

 

Custom Cell, Column examples => DatePicker, accept null value.

 

DataGridView key Points,布布扣,bubuko.com

DataGridView key Points

标签:des   datagridview   style   http   color   os   io   for   

原文地址:http://www.cnblogs.com/kevinygq/p/3886912.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!