PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/VBWinFormDataGridView/CustomDataGridViewColumn/ReadMe.txt

#
Plain Text | 64 lines | 40 code | 24 blank | 0 comment | 0 complexity | b43e23ab44b5f72ed7c71b602a37ff09 MD5 | raw file
 1================================================================================
 2       WINDOWS FORMS APPLICATION : VBWinFormDataGridView Project Overview
 3       
 4                   CustomDataGridViewColumn Sample
 5                        
 6===============================================================================
 7
 8/////////////////////////////////////////////////////////////////////////////
 9Use:
10
11This sample demonstrates how to create a custom DataGridView column.
12
13
14/////////////////////////////////////////////////////////////////////////////
15Remark:
16
17There're six standard DataGridViewColumn types for use as follows:
18
19DataGridViewTextBoxColumn
20DataGridViewCheckedBoxColumn
21DataGridViewComboBoxColumn
22DataGridViewLinkColumn
23DataGridViewButtonColumn
24DataGridViewImageColumn
25
26However, developers may want to use a different control for editing on the column,
27e.g. MarkedTextBox, DateTimePicker etc. This feature can be achieved in two ways:
28
291. Create a custom DataGridViewColumn; 
30
31   The code in this CustomDataGridViewColumn sample demonstrates how to do this;
32
332. Place the editing control on the current cell when editing begins, and hide
34   the editing control when the editing completes. For the details of this
35   approach, please refer to the EditingControlHosting sample.
36
37
38/////////////////////////////////////////////////////////////////////////////
39Creation:
40
411. Create a MaskedTextBoxEditingControl class derive from MaskedTextBox class 
42   and IDataGridViewEditingControl class, see the code in the 
43   MaskedTextBoxEditingControl.vb file for the implementation details;
44
452. Create a MaskedTextBoxCell class derive from DataGridViewTextBoxCell class,
46   see the code in the MaskedTextBoxCell.vb file for the implementation details;
47
483. Create a MaskedTextBoxColumn class derive from DataGridViewColumn class,
49   see the code in the MaskedTextBoxColumn.vb file for the implementation details;
50
514. Build the program;
52
53
54/////////////////////////////////////////////////////////////////////////////
55References:
56
571. DataGridView Custom Column Sample
58http://msdn.microsoft.com/en-us/library/ms180996.aspx
59
602. Windows Forms FAQs
61http://windowsclient.net/blogs/faqs/archive/tags/Custom+Designers/default.aspx
62
63
64/////////////////////////////////////////////////////////////////////////////