GrapeCity MultiRow Windows Forms Documentation
ValueIsIcon Property
Example 


Gets or sets a value that indicates whether the image cell displays a System.Drawing.Icon instance instead of another type of image.
Syntax
<DefaultValueAttribute()>
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Indicates whether the value object of the ImageCell is Icon.")>
Public Property ValueIsIcon As Boolean
Dim instance As ImageCell
Dim value As Boolean
 
instance.ValueIsIcon = value
 
value = instance.ValueIsIcon
[DefaultValue()]
[SRCategory("Behavior")]
[SRDescription("Indicates whether the value object of the ImageCell is Icon.")]
public bool ValueIsIcon {get; set;}

Property Value

true if the image cell displays a System.Drawing.Icon value; otherwise, false. The default value is false.
Remarks

When this property is true, the FormattedValueType property returns a System.Type object that represents the System.Drawing.Icon type. The Cell.Value attempts to transfer to an Icon object using the cell formatting logic. When the ValuesIsIcon property is false, the FormattedValueType property returns a Type object that represents the System.Drawing.Image type.

.
Example
This example sets the ValueIsIcon property.
GrapeCity.Win.MultiRow.ImageCell image1 = new GrapeCity.Win.MultiRow.ImageCell();
image1.ValueIsIcon = false;
GrapeCity.Win.MultiRow.TextBoxCell text2 = new GrapeCity.Win.MultiRow.TextBoxCell();            
text2.Name = "text2";
GrapeCity.Win.MultiRow.Template template1 = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] { image1, text2 }, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber);
template1.ColumnHeaders[0].Cells[0].Value = "Column1";
template1.ColumnHeaders[0].Cells[1].Value = "Column2";
gcMultiRow1.Template = template1;
gcMultiRow1.RowCount = 3;
gcMultiRow1.Rows[0].Cells[0].Value = new Bitmap("C:\\cut.png");
Dim image1 As New GrapeCity.Win.MultiRow.ImageCell()
image1.ValueIsIcon = False
Dim text2 As New GrapeCity.Win.MultiRow.TextBoxCell()
text2.Name = "text2"
Dim template1 As GrapeCity.Win.MultiRow.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {image1, text2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber)
template1.ColumnHeaders(0).Cells(0).Value = "Column1"
template1.ColumnHeaders(0).Cells(1).Value = "Column2"
GcMultiRow1.Template = template1
GcMultiRow1.RowCount = 3
GcMultiRow1.Rows(0).Cells(0).Value = New Bitmap("C:\cut.png")
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ImageCell Class
ImageCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.