-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
DataGridViewImageCell.xml
930 lines (876 loc) · 72.6 KB
/
DataGridViewImageCell.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
<Type Name="DataGridViewImageCell" FullName="System.Windows.Forms.DataGridViewImageCell">
<TypeSignature Language="C#" Value="public class DataGridViewImageCell : System.Windows.Forms.DataGridViewCell" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DataGridViewImageCell extends System.Windows.Forms.DataGridViewCell" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.DataGridViewImageCell" />
<TypeSignature Language="VB.NET" Value="Public Class DataGridViewImageCell
Inherits DataGridViewCell" />
<TypeSignature Language="F#" Value="type DataGridViewImageCell = class
 inherit DataGridViewCell" />
<TypeSignature Language="C++ CLI" Value="public ref class DataGridViewImageCell : System::Windows::Forms::DataGridViewCell" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.Forms.DataGridViewCell</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Displays a graphic in a <see cref="T:System.Windows.Forms.DataGridView" /> control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.DataGridViewImageCell> class is a specialized type of <xref:System.Windows.Forms.DataGridViewCell> used to display an <xref:System.Drawing.Image> or an <xref:System.Drawing.Icon>, depending on the value of the <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property. Typically, the <xref:System.Windows.Forms.DataGridViewCell.ReadOnly%2A> property of a <xref:System.Windows.Forms.DataGridViewImageCell> is set to `true` to indicate that the user cannot edit the cell contents.
The <xref:System.Windows.Forms.DataGridViewImageColumn> is the column type specialized to hold cells of this type. By default, the <xref:System.Windows.Forms.DataGridViewImageColumn.CellTemplate%2A?displayProperty=nameWithType> is initialized to a new <xref:System.Windows.Forms.DataGridViewImageCell>. To pattern the cells within a column after an existing <xref:System.Windows.Forms.DataGridViewImageCell>, set the column's <xref:System.Windows.Forms.DataGridViewImageColumn.CellTemplate%2A> property to the cell to use as a pattern.
The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary.
## Examples
The following code example demonstrates how to change the image in an image cell using <xref:System.Windows.Forms.DataGridViewCell>. This code example is part of a larger example provided for the topic [How to: Work with Image Columns in the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/how-to-work-with-image-columns-in-the-windows-forms-datagridview-control).
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ImageColumn_TicTacToe/CPP/tictactoe.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellClick/tictactoe.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ImageColumn_TicTacToe/VB/tictactoe.vb" id="Snippet10":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When you derive from <see cref="T:System.Windows.Forms.DataGridViewImageCell" /> and add new properties to the derived class, be sure to override the <see cref="M:System.Windows.Forms.DataGridViewImageCell.Clone" /> method to copy the new properties during cloning operations. You should also call the base class's <see cref="M:System.Windows.Forms.DataGridViewImageCell.Clone" /> method so that the properties of the base class are copied to the new cell.</para>
</block>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Windows.Forms.DataGridViewCell" />
<altmember cref="T:System.Windows.Forms.DataGridViewImageColumn" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageColumn.CellTemplate" />
<altmember cref="T:System.Drawing.Image" />
<altmember cref="T:System.Drawing.Icon" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.DataGridViewImageCell" /> class.</summary>
<altmember cref="T:System.Windows.Forms.DataGridView" />
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataGridViewImageCell ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 DataGridViewImageCell();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.DataGridViewImageCell" /> class, configuring it for use with cell values other than <see cref="T:System.Drawing.Icon" /> objects.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor calls <xref:System.Windows.Forms.DataGridViewImageCell.%23ctor%28System.Boolean%29> with a `valueIsIcon` parameter value of `false`.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataGridViewImageCell (bool valueIsIcon);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool valueIsIcon) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.#ctor(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (valueIsIcon As Boolean)" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.DataGridViewImageCell : bool -> System.Windows.Forms.DataGridViewImageCell" Usage="new System.Windows.Forms.DataGridViewImageCell valueIsIcon" />
<MemberSignature Language="C++ CLI" Value="public:
 DataGridViewImageCell(bool valueIsIcon);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="valueIsIcon" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="valueIsIcon">The cell will display an <see cref="T:System.Drawing.Icon" /> value.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.DataGridViewImageCell" /> class, optionally configuring it for use with <see cref="T:System.Drawing.Icon" /> cell values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you use this constructor, the <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property is set to the value of the `valueIsIcon` parameter.
To ensure that the alpha channel of <xref:System.Drawing.Icon> values is painted correctly, use this constructor with a `valueIsIcon` parameter value of `true`.
If the `valueIsIcon` parameter is `true`, the <xref:System.Windows.Forms.DataGridViewImageCell.FormattedValueType%2A> and <xref:System.Windows.Forms.DataGridViewImageCell.ValueType%2A> properties return a <xref:System.Type> object representing the <xref:System.Drawing.Icon> type.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Drawing.Icon" />
<altmember cref="P:System.Windows.Forms.DataGridViewCell.Value" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.FormattedValueType" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueType" />
</Docs>
</Member>
<Member MemberName="Clone">
<MemberSignature Language="C#" Value="public override object Clone ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance object Clone() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.Clone" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Clone () As Object" />
<MemberSignature Language="F#" Value="override this.Clone : unit -> obj" Usage="dataGridViewImageCell.Clone " />
<MemberSignature Language="C++ CLI" Value="public:
 override System::Object ^ Clone();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates an exact copy of this cell.</summary>
<returns>An <see cref="T:System.Object" /> that represents the cloned <see cref="T:System.Windows.Forms.DataGridViewImageCell" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override the <xref:System.Windows.Forms.DataGridViewImageCell.Clone%2A> method whenever you derive from <xref:System.Windows.Forms.DataGridViewImageCell> and add new properties to the derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.DataGridViewImageCell.Clone" /> in a derived class, call the base class's <see cref="M:System.Windows.Forms.DataGridViewImageCell.Clone" /> method so that the properties of the base class are copied to the new cell, and be sure to also copy the values of any properties that were added to the derived class.</para>
</block>
<altmember cref="T:System.Windows.Forms.DataGridView" />
</Docs>
</Member>
<Member MemberName="CreateAccessibilityInstance">
<MemberSignature Language="C#" Value="protected override System.Windows.Forms.AccessibleObject CreateAccessibilityInstance ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Forms.AccessibleObject CreateAccessibilityInstance() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.CreateAccessibilityInstance" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateAccessibilityInstance () As AccessibleObject" />
<MemberSignature Language="F#" Value="override this.CreateAccessibilityInstance : unit -> System.Windows.Forms.AccessibleObject" Usage="dataGridViewImageCell.CreateAccessibilityInstance " />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Windows::Forms::AccessibleObject ^ CreateAccessibilityInstance();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.AccessibleObject</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new accessible object for the <see cref="T:System.Windows.Forms.DataGridViewImageCell" />.</summary>
<returns>A new <see cref="T:System.Windows.Forms.DataGridViewImageCell.DataGridViewImageCellAccessibleObject" /> for the <see cref="T:System.Windows.Forms.DataGridViewImageCell" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you do not explicitly call the <xref:System.Windows.Forms.DataGridViewImageCell.CreateAccessibilityInstance%2A> method, it will be called when the <xref:System.Windows.Forms.DataGridViewCell.AccessibilityObject%2A> property is referenced.
> [!NOTE]
> To get or set <xref:System.Windows.Forms.DataGridViewCell.AccessibilityObject%2A>, you must add a reference to the `Accessibility` assembly installed with the .NET Framework.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="M:System.Windows.Forms.DataGridViewImageCell.CreateAccessibilityInstance" />
<altmember cref="P:System.Windows.Forms.DataGridViewCell.AccessibilityObject" />
</Docs>
</Member>
<Member MemberName="DefaultNewRowValue">
<MemberSignature Language="C#" Value="public override object DefaultNewRowValue { get; }" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0" />
<MemberSignature Language="ILAsm" Value=".property instance object DefaultNewRowValue" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.DefaultNewRowValue" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property DefaultNewRowValue As Object" />
<MemberSignature Language="F#" Value="member this.DefaultNewRowValue : obj" Usage="System.Windows.Forms.DataGridViewImageCell.DefaultNewRowValue" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Object ^ DefaultNewRowValue { System::Object ^ get(); };" />
<MemberSignature Language="C#" Value="public override object? DefaultNewRowValue { get; }" FrameworkAlternate="windowsdesktop-9.0" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[get: System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the default value that is used when creating a new row.</summary>
<value>An object containing a default image placeholder, or <see langword="null" /> to display an empty cell.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of this property should be of type <xref:System.Drawing.Image> or type <xref:System.Drawing.Icon>, depending on the value of the <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property.
Whenever a <xref:System.Windows.Forms.DataGridView> is displayed in which new rows can be added, the last row is an empty new row of cells loaded with default values. Override this property to provide a different default image for these cells or to return `null` to avoid displaying images.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
<altmember cref="T:System.Drawing.Image" />
<altmember cref="T:System.Drawing.Icon" />
</Docs>
</Member>
<Member MemberName="Description">
<MemberSignature Language="C#" Value="public string Description { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Description" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.Description" />
<MemberSignature Language="VB.NET" Value="Public Property Description As String" />
<MemberSignature Language="F#" Value="member this.Description : string with get, set" Usage="System.Windows.Forms.DataGridViewImageCell.Description" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Description { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text associated with the image.</summary>
<value>The text associated with the image displayed in the cell.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You will typically provide a text description for each image cell. This description provides an accessible alternative to the image. Additionally, the description text is used when the cell value is copied onto the Clipboard.
Setting the <xref:System.Windows.Forms.DataGridViewImageColumn.Description%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewImageCell.Description%2A> property of every cell in the column. To override the specified value for individual cells, set the cell values after you set the column value.
## Examples
The following code example demonstrates the use of the <xref:System.Windows.Forms.DataGridViewImageColumn.Description%2A?displayProperty=nameWithType> property, which is similar to this property. This example is part of a larger example available in [How to: Work with Image Columns in the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/how-to-work-with-image-columns-in-the-windows-forms-datagridview-control).
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ImageColumn_TicTacToe/CPP/tictactoe.cpp" id="Snippet20":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellClick/tictactoe.cs" id="Snippet20":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ImageColumn_TicTacToe/VB/tictactoe.vb" id="Snippet20":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageColumn.Description" />
</Docs>
</Member>
<Member MemberName="EditType">
<MemberSignature Language="C#" Value="public override Type EditType { get; }" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type EditType" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.EditType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property EditType As Type" />
<MemberSignature Language="F#" Value="member this.EditType : Type" Usage="System.Windows.Forms.DataGridViewImageCell.EditType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Type ^ EditType { Type ^ get(); };" />
<MemberSignature Language="C#" Value="public override Type? EditType { get; }" FrameworkAlternate="windowsdesktop-9.0" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.Interfaces | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.Interfaces | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[get: System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type of the cell's hosted editing control.</summary>
<value>The <see cref="T:System.Type" /> of the underlying editing control. As implemented in this class, this property is always <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.DataGridViewImageCell.EditType%2A> property is always `null` because there is no associated Windows Forms control for editing an image.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
</Docs>
</Member>
<Member MemberName="FormattedValueType">
<MemberSignature Language="C#" Value="public override Type FormattedValueType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type FormattedValueType" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.FormattedValueType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property FormattedValueType As Type" />
<MemberSignature Language="F#" Value="member this.FormattedValueType : Type" Usage="System.Windows.Forms.DataGridViewImageCell.FormattedValueType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Type ^ FormattedValueType { Type ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type of the formatted value associated with the cell.</summary>
<value>A <see cref="T:System.Type" /> object representing display value type of the cell, which is the <see cref="T:System.Drawing.Image" /> type if the <see cref="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" /> property is set to <see langword="false" /> or the <see cref="T:System.Drawing.Icon" /> type otherwise.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of this property is a property is a <xref:System.Type> object representing either the <xref:System.Drawing.Image> type or the <xref:System.Drawing.Icon> type because a <xref:System.Windows.Forms.DataGridViewImageCell> can only handle graphic images.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.DataGridViewCell.FormattedValueType%2A?displayProperty=nameWithType> property to determine the type of the cell contents. In this example, the <xref:System.Windows.Forms.DataGridViewCell.FormattedValueType%2A?displayProperty=nameWithType> property is used to determine whether the cell contains a <xref:System.String> before attempting to convert the value. This example is part of a larger example available in the <xref:System.Windows.Forms.DataGridView.SelectionChanged?displayProperty=nameWithType> event.
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidated/form1.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridViewSelectionSum/VB/form1.vb" id="Snippet10":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Type" />
<altmember cref="P:System.Windows.Forms.DataGridViewCell.FormattedValue" />
<altmember cref="T:System.Drawing.Image" />
<altmember cref="T:System.Drawing.Icon" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
</Docs>
</Member>
<Member MemberName="GetContentBounds">
<MemberSignature Language="C#" Value="protected override System.Drawing.Rectangle GetContentBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Drawing.Rectangle GetContentBounds(class System.Drawing.Graphics graphics, class System.Windows.Forms.DataGridViewCellStyle cellStyle, int32 rowIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.GetContentBounds(System.Drawing.Graphics,System.Windows.Forms.DataGridViewCellStyle,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetContentBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle" />
<MemberSignature Language="F#" Value="override this.GetContentBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle" Usage="dataGridViewImageCell.GetContentBounds (graphics, cellStyle, rowIndex)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Drawing::Rectangle GetContentBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="cellStyle" Type="System.Windows.Forms.DataGridViewCellStyle" />
<Parameter Name="rowIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="graphics">The graphics context for the cell.</param>
<param name="cellStyle">The <see cref="T:System.Windows.Forms.DataGridViewCellStyle" /> to be applied to the cell.</param>
<param name="rowIndex">The index of the cell's parent row.</param>
<summary>Returns the bounding rectangle that encloses the cell's content area, which is calculated using the specified <see cref="T:System.Drawing.Graphics" /> and cell style.</summary>
<returns>The <see cref="T:System.Drawing.Rectangle" /> that bounds the cell's contents.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Forms.DataGridViewCell.GetContentBounds(System.Drawing.Graphics,System.Windows.Forms.DataGridViewCellStyle,System.Int32)" />
</Docs>
</Member>
<Member MemberName="GetErrorIconBounds">
<MemberSignature Language="C#" Value="protected override System.Drawing.Rectangle GetErrorIconBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Drawing.Rectangle GetErrorIconBounds(class System.Drawing.Graphics graphics, class System.Windows.Forms.DataGridViewCellStyle cellStyle, int32 rowIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.GetErrorIconBounds(System.Drawing.Graphics,System.Windows.Forms.DataGridViewCellStyle,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetErrorIconBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle" />
<MemberSignature Language="F#" Value="override this.GetErrorIconBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle" Usage="dataGridViewImageCell.GetErrorIconBounds (graphics, cellStyle, rowIndex)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Drawing::Rectangle GetErrorIconBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="cellStyle" Type="System.Windows.Forms.DataGridViewCellStyle" />
<Parameter Name="rowIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="graphics">The graphics context for the cell.</param>
<param name="cellStyle">The <see cref="T:System.Windows.Forms.DataGridViewCellStyle" /> to be applied to the cell.</param>
<param name="rowIndex">The index of the cell's parent row.</param>
<summary>Returns the bounding rectangle that encloses the cell's error icon, if one is displayed.</summary>
<returns>The <see cref="T:System.Drawing.Rectangle" /> that bounds the cell's error icon, if one is displayed; otherwise, <see cref="F:System.Drawing.Rectangle.Empty" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Forms.DataGridViewCell.GetErrorIconBounds(System.Drawing.Graphics,System.Windows.Forms.DataGridViewCellStyle,System.Int32)" />
</Docs>
</Member>
<Member MemberName="GetFormattedValue">
<MemberSignature Language="C#" Value="protected override object GetFormattedValue (object value, int rowIndex, ref System.Windows.Forms.DataGridViewCellStyle cellStyle, System.ComponentModel.TypeConverter valueTypeConverter, System.ComponentModel.TypeConverter formattedValueTypeConverter, System.Windows.Forms.DataGridViewDataErrorContexts context);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance object GetFormattedValue(object value, int32 rowIndex, class System.Windows.Forms.DataGridViewCellStyle& cellStyle, class System.ComponentModel.TypeConverter valueTypeConverter, class System.ComponentModel.TypeConverter formattedValueTypeConverter, valuetype System.Windows.Forms.DataGridViewDataErrorContexts context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.GetFormattedValue(System.Object,System.Int32,System.Windows.Forms.DataGridViewCellStyle@,System.ComponentModel.TypeConverter,System.ComponentModel.TypeConverter,System.Windows.Forms.DataGridViewDataErrorContexts)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetFormattedValue (value As Object, rowIndex As Integer, ByRef cellStyle As DataGridViewCellStyle, valueTypeConverter As TypeConverter, formattedValueTypeConverter As TypeConverter, context As DataGridViewDataErrorContexts) As Object" />
<MemberSignature Language="F#" Value="override this.GetFormattedValue : obj * int * DataGridViewCellStyle * System.ComponentModel.TypeConverter * System.ComponentModel.TypeConverter * System.Windows.Forms.DataGridViewDataErrorContexts -> obj" Usage="dataGridViewImageCell.GetFormattedValue (value, rowIndex, cellStyle, valueTypeConverter, formattedValueTypeConverter, context)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Object ^ GetFormattedValue(System::Object ^ value, int rowIndex, System::Windows::Forms::DataGridViewCellStyle ^ % cellStyle, System::ComponentModel::TypeConverter ^ valueTypeConverter, System::ComponentModel::TypeConverter ^ formattedValueTypeConverter, System::Windows::Forms::DataGridViewDataErrorContexts context);" />
<MemberSignature Language="C#" Value="protected override object? GetFormattedValue (object? value, int rowIndex, ref System.Windows.Forms.DataGridViewCellStyle cellStyle, System.ComponentModel.TypeConverter? valueTypeConverter, System.ComponentModel.TypeConverter? formattedValueTypeConverter, System.Windows.Forms.DataGridViewDataErrorContexts context);" FrameworkAlternate="windowsdesktop-9.0" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="rowIndex" Type="System.Int32" />
<Parameter Name="cellStyle" Type="System.Windows.Forms.DataGridViewCellStyle" RefType="ref">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="valueTypeConverter" Type="System.ComponentModel.TypeConverter" />
<Parameter Name="formattedValueTypeConverter" Type="System.ComponentModel.TypeConverter" />
<Parameter Name="context" Type="System.Windows.Forms.DataGridViewDataErrorContexts" />
</Parameters>
<Docs>
<param name="value">The value to be formatted.</param>
<param name="rowIndex">The index of the cell's parent row.</param>
<param name="cellStyle">The <see cref="T:System.Windows.Forms.DataGridViewCellStyle" /> in effect for the cell.</param>
<param name="valueTypeConverter">A <see cref="T:System.ComponentModel.TypeConverter" /> associated with the value type that provides custom conversion to the formatted value type, or <see langword="null" /> if no such custom conversion is needed.</param>
<param name="formattedValueTypeConverter">A <see cref="T:System.ComponentModel.TypeConverter" /> associated with the formatted value type that provides custom conversion from the value type, or <see langword="null" /> if no such custom conversion is needed.</param>
<param name="context">A bitwise combination of <see cref="T:System.Windows.Forms.DataGridViewDataErrorContexts" /> values describing the context in which the formatted value is needed.</param>
<summary>Returns a graphic as it would be displayed in the cell.</summary>
<returns>An object that represents the formatted image.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.DataGridView> control calls this method to convert a cell value into an equivalent display value of the type indicated by the <xref:System.Windows.Forms.DataGridViewImageCell.FormattedValueType%2A> property. The control passes the cell value to this method in the `value` parameter.
If the `context` parameter value includes the <xref:System.Windows.Forms.DataGridViewDataErrorContexts.ClipboardContent> value, this method returns the value of the <xref:System.Windows.Forms.DataGridViewImageCell.Description%2A> property for copying to the Clipboard. Otherwise, the <xref:System.Windows.Forms.DataGridView.CellFormatting?displayProperty=nameWithType> event occurs.
A <xref:System.Windows.Forms.DataGridView.CellFormatting> event handler can modify both `value` and `cellStyle`. If the handler does not set the <xref:System.Windows.Forms.DataGridViewCellFormattingEventArgs.FormattingApplied%2A?displayProperty=nameWithType> property to `true`, however, this method formats `value` using the formatting properties of the `cellStyle` object.
If formatting is unsuccessful, the <xref:System.Windows.Forms.DataGridView.DataError> event occurs. If there is no handler for this event or the handler sets the <xref:System.Windows.Forms.DataGridViewDataErrorEventArgs.ThrowException%2A?displayProperty=nameWithType> property to `true`, an exception is thrown.
If formatting is successful and the type of the formatted value matches the value of the <xref:System.Windows.Forms.DataGridViewImageCell.FormattedValueType%2A> property, this method returns the formatted value. Otherwise, this method returns a standard error graphic in the type indicated by the <xref:System.Windows.Forms.DataGridViewImageCell.FormattedValueType%2A> property.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.FormattedValueType" />
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="E:System.Windows.Forms.DataGridView.DataError" />
<altmember cref="E:System.Windows.Forms.DataGridView.CellFormatting" />
<altmember cref="T:System.Windows.Forms.DataGridViewCellStyle" />
<altmember cref="T:System.Windows.Forms.DataGridViewDataErrorContexts" />
<altmember cref="F:System.Windows.Forms.DataGridViewDataErrorContexts.ClipboardContent" />
<altmember cref="T:System.ComponentModel.TypeConverter" />
<altmember cref="P:System.Windows.Forms.DataGridViewCell.FormattedValue" />
<altmember cref="T:System.Drawing.Image" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.Description" />
</Docs>
</Member>
<Member MemberName="GetPreferredSize">
<MemberSignature Language="C#" Value="protected override System.Drawing.Size GetPreferredSize (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex, System.Drawing.Size constraintSize);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Drawing.Size GetPreferredSize(class System.Drawing.Graphics graphics, class System.Windows.Forms.DataGridViewCellStyle cellStyle, int32 rowIndex, valuetype System.Drawing.Size constraintSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.GetPreferredSize(System.Drawing.Graphics,System.Windows.Forms.DataGridViewCellStyle,System.Int32,System.Drawing.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetPreferredSize (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer, constraintSize As Size) As Size" />
<MemberSignature Language="F#" Value="override this.GetPreferredSize : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int * System.Drawing.Size -> System.Drawing.Size" Usage="dataGridViewImageCell.GetPreferredSize (graphics, cellStyle, rowIndex, constraintSize)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Drawing::Size GetPreferredSize(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex, System::Drawing::Size constraintSize);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="cellStyle" Type="System.Windows.Forms.DataGridViewCellStyle" />
<Parameter Name="rowIndex" Type="System.Int32" />
<Parameter Name="constraintSize" Type="System.Drawing.Size" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> used to draw the cell.</param>
<param name="cellStyle">A <see cref="T:System.Windows.Forms.DataGridViewCellStyle" /> that represents the style of the cell.</param>
<param name="rowIndex">The zero-based row index of the cell.</param>
<param name="constraintSize">The cell's maximum allowable size.</param>
<summary>Calculates the preferred size, in pixels, of the cell.</summary>
<returns>A <see cref="T:System.Drawing.Size" /> that represents the preferred size, in pixels, of the cell.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Forms.DataGridViewCell.GetPreferredSize(System.Drawing.Graphics,System.Windows.Forms.DataGridViewCellStyle,System.Int32,System.Drawing.Size)" />
</Docs>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="C#" Value="protected override object GetValue (int rowIndex);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance object GetValue(int32 rowIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.GetValue(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetValue (rowIndex As Integer) As Object" />
<MemberSignature Language="F#" Value="override this.GetValue : int -> obj" Usage="dataGridViewImageCell.GetValue rowIndex" />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Object ^ GetValue(int rowIndex);" />
<MemberSignature Language="C#" Value="protected override object? GetValue (int rowIndex);" FrameworkAlternate="windowsdesktop-9.0" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rowIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="rowIndex">The index of the cell's parent row.</param>
<summary>Gets the value of the cell.</summary>
<returns>The value contained in the <see cref="T:System.Windows.Forms.DataGridViewCell" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Forms.DataGridViewCell.GetValue(System.Int32)" />
</Docs>
</Member>
<Member MemberName="ImageLayout">
<MemberSignature Language="C#" Value="public System.Windows.Forms.DataGridViewImageCellLayout ImageLayout { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.DataGridViewImageCellLayout ImageLayout" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.ImageLayout" />
<MemberSignature Language="VB.NET" Value="Public Property ImageLayout As DataGridViewImageCellLayout" />
<MemberSignature Language="F#" Value="member this.ImageLayout : System.Windows.Forms.DataGridViewImageCellLayout with get, set" Usage="System.Windows.Forms.DataGridViewImageCell.ImageLayout" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::DataGridViewImageCellLayout ImageLayout { System::Windows::Forms::DataGridViewImageCellLayout get(); void set(System::Windows::Forms::DataGridViewImageCellLayout value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Windows.Forms.DataGridViewImageCellLayout.NotSet)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Windows.Forms.DataGridViewImageCellLayout.NotSet)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DataGridViewImageCellLayout</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the graphics layout for the cell.</summary>
<value>A <see cref="T:System.Windows.Forms.DataGridViewImageCellLayout" /> for this cell. The default is <see cref="F:System.Windows.Forms.DataGridViewImageCellLayout.NotSet" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Changing this property will cause the cell to redraw itself.
Setting the <xref:System.Windows.Forms.DataGridViewImageColumn.ImageLayout%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewImageCell.ImageLayout%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The supplied <see cref="T:System.Windows.Forms.DataGridViewImageCellLayout" /> value is invalid.</exception>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Windows.Forms.DataGridViewImageCellLayout" />
<altmember cref="P:System.Windows.Forms.DataGridViewCellStyle.Padding" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageColumn.ImageLayout" />
</Docs>
</Member>
<Member MemberName="Paint">
<MemberSignature Language="C#" Value="protected override void Paint (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates elementState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Paint(class System.Drawing.Graphics graphics, valuetype System.Drawing.Rectangle clipBounds, valuetype System.Drawing.Rectangle cellBounds, int32 rowIndex, valuetype System.Windows.Forms.DataGridViewElementStates elementState, object value, object formattedValue, string errorText, class System.Windows.Forms.DataGridViewCellStyle cellStyle, class System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, valuetype System.Windows.Forms.DataGridViewPaintParts paintParts) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.Paint(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Int32,System.Windows.Forms.DataGridViewElementStates,System.Object,System.Object,System.String,System.Windows.Forms.DataGridViewCellStyle,System.Windows.Forms.DataGridViewAdvancedBorderStyle,System.Windows.Forms.DataGridViewPaintParts)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Paint (graphics As Graphics, clipBounds As Rectangle, cellBounds As Rectangle, rowIndex As Integer, elementState As DataGridViewElementStates, value As Object, formattedValue As Object, errorText As String, cellStyle As DataGridViewCellStyle, advancedBorderStyle As DataGridViewAdvancedBorderStyle, paintParts As DataGridViewPaintParts)" />
<MemberSignature Language="F#" Value="override this.Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * obj * obj * string * System.Windows.Forms.DataGridViewCellStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewPaintParts -> unit" Usage="dataGridViewImageCell.Paint (graphics, clipBounds, cellBounds, rowIndex, elementState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts)" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates elementState, System::Object ^ value, System::Object ^ formattedValue, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ advancedBorderStyle, System::Windows::Forms::DataGridViewPaintParts paintParts);" />
<MemberSignature Language="C#" Value="protected override void Paint (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates elementState, object? value, object? formattedValue, string? errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);" FrameworkAlternate="windowsdesktop-9.0" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="clipBounds" Type="System.Drawing.Rectangle" />
<Parameter Name="cellBounds" Type="System.Drawing.Rectangle" />
<Parameter Name="rowIndex" Type="System.Int32" />
<Parameter Name="elementState" Type="System.Windows.Forms.DataGridViewElementStates" />
<Parameter Name="value" Type="System.Object">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="formattedValue" Type="System.Object">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="errorText" Type="System.String">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="cellStyle" Type="System.Windows.Forms.DataGridViewCellStyle" />
<Parameter Name="advancedBorderStyle" Type="System.Windows.Forms.DataGridViewAdvancedBorderStyle" />
<Parameter Name="paintParts" Type="System.Windows.Forms.DataGridViewPaintParts" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> used to paint the cell.</param>
<param name="clipBounds">A <see cref="T:System.Drawing.Rectangle" /> that represents the area of the <see cref="T:System.Windows.Forms.DataGridView" /> that needs to be repainted.</param>
<param name="cellBounds">A <see cref="T:System.Drawing.Rectangle" /> that contains the bounds of the cell that is being painted.</param>
<param name="rowIndex">The row index of the cell that is being painted.</param>
<param name="elementState">A bitwise combination of <see cref="T:System.Windows.Forms.DataGridViewElementStates" /> values that specifies the state of the cell.</param>
<param name="value">The data of the cell that is being painted.</param>
<param name="formattedValue">The formatted data of the cell that is being painted.</param>
<param name="errorText">An error message that is associated with the cell.</param>
<param name="cellStyle">A <see cref="T:System.Windows.Forms.DataGridViewCellStyle" /> that contains formatting and style information about the cell.</param>
<param name="advancedBorderStyle">A <see cref="T:System.Windows.Forms.DataGridViewAdvancedBorderStyle" /> that contains border styles for the cell that is being painted.</param>
<param name="paintParts">A bitwise combination of the <see cref="T:System.Windows.Forms.DataGridViewPaintParts" /> values that specifies which parts of the cell need to be painted.</param>
<summary>Paints the current <see cref="T:System.Windows.Forms.DataGridViewImageCell" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.DataGridViewImageCell.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="F#" Value="override this.ToString : unit -> string" Usage="dataGridViewImageCell.ToString " />
<MemberSignature Language="C++ CLI" Value="public:
 override System::String ^ ToString();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a string that describes the current object.</summary>
<returns>A string that represents the current object.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Forms.DataGridViewCell.ToString" />
</Docs>
</Member>
<Member MemberName="ValueIsIcon">
<MemberSignature Language="C#" Value="public bool ValueIsIcon { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ValueIsIcon" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
<MemberSignature Language="VB.NET" Value="Public Property ValueIsIcon As Boolean" />
<MemberSignature Language="F#" Value="member this.ValueIsIcon : bool with get, set" Usage="System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool ValueIsIcon { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether this cell displays an <see cref="T:System.Drawing.Icon" /> value.</summary>
<value>
<see langword="true" /> if this cell displays an <see cref="T:System.Drawing.Icon" /> value; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To ensure that the alpha channel of <xref:System.Drawing.Icon> values is painted correctly, set this property to `true`. When this property is `true`, the <xref:System.Windows.Forms.DataGridViewImageCell.FormattedValueType%2A> and <xref:System.Windows.Forms.DataGridViewImageCell.ValueType%2A> properties return a <xref:System.Type> object representing the <xref:System.Drawing.Icon> type.
Setting the <xref:System.Windows.Forms.DataGridViewImageColumn.ValuesAreIcons%2A> property of the owning column also sets the <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.
When the value of this property changes for a cell in the row for new records, the image displayed in the cell is updated to the current value of the <xref:System.Windows.Forms.DataGridViewImageCell.DefaultNewRowValue%2A> property.
Unlike the column <xref:System.Windows.Forms.DataGridViewImageColumn.ValuesAreIcons%2A> property, the cell <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property does not automatically update the <xref:System.Windows.Forms.DataGridViewCellStyle.NullValue%2A> property of the associated cell style when you change its value. When you change the cell <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property value to `true`, be sure to set the <xref:System.Windows.Forms.DataGridViewCellStyle.NullValue%2A> property of the object returned by the <xref:System.Windows.Forms.DataGridViewCell.Style%2A> property to a valid <xref:System.Drawing.Icon>. When you change the <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property value to `false`, be sure to set the <xref:System.Windows.Forms.DataGridViewCellStyle.NullValue%2A> property to a valid <xref:System.Drawing.Image>.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Drawing.Icon" />
<altmember cref="P:System.Windows.Forms.DataGridViewCell.Value" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.FormattedValueType" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueType" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageColumn.ValuesAreIcons" />
</Docs>
</Member>
<Member MemberName="ValueType">
<MemberSignature Language="C#" Value="public override Type ValueType { get; set; }" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type ValueType" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.DataGridViewImageCell.ValueType" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property ValueType As Type" />
<MemberSignature Language="F#" Value="member this.ValueType : Type with get, set" Usage="System.Windows.Forms.DataGridViewImageCell.ValueType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Type ^ ValueType { Type ^ get(); void set(Type ^ value); };" />
<MemberSignature Language="C#" Value="public override Type? ValueType { get; set; }" FrameworkAlternate="windowsdesktop-9.0" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[get: System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-9.0">
<AttributeName Language="C#">[set: System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the data type of the values in the cell.</summary>
<value>The <see cref="T:System.Type" /> of the cell's value.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When retrieving this property, if the <xref:System.Windows.Forms.DataGridViewImageCell.ValueType%2A> for the cell has not been set, then the <xref:System.Windows.Forms.DataGridViewColumn.ValueType%2A?displayProperty=nameWithType> for the owning column is used, if it exists. If no owning column exists, the default value type is used, which is the <xref:System.Drawing.Image> type if the <xref:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon%2A> property is set to `false` and the <xref:System.Drawing.Icon> type otherwise.
The <xref:System.Windows.Forms.DataGridViewCell.Value%2A> is the actual data object contained in the cell, whereas the <xref:System.Windows.Forms.DataGridViewCell.FormattedValue%2A> property is the formatted representation of this object. The <xref:System.Windows.Forms.DataGridViewImageCell.ValueType%2A> and <xref:System.Windows.Forms.DataGridViewImageCell.FormattedValueType%2A> properties correspond to the data types of these values, respectively.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="P:System.Windows.Forms.DataGridViewCell.Value" />
<altmember cref="P:System.Windows.Forms.DataGridViewColumn.ValueType" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.FormattedValueType" />
<altmember cref="P:System.Windows.Forms.DataGridViewImageCell.ValueIsIcon" />
<altmember cref="T:System.Drawing.Image" />
<altmember cref="T:System.Drawing.Icon" />
</Docs>
</Member>
</Members>
</Type>