We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Transparent color throws an exception

Thread ID:

Created:

Updated:

Platform:

Replies:

40451 Feb 2,2006 11:19 PM UTC Aug 9,2006 09:09 AM UTC WinForms 6
loading
Tags: GridControl
Patrick
Asked On February 2, 2006 11:19 PM UTC

I am using the dropdowngrid sample in v3.0.1. Changing the cell to transparent color throws an exception. Is there any workaround for this problem?

Administrator [Syncfusion]
Replied On February 3, 2006 12:18 PM UTC

Hi Patrick, Here is the work around. To have the transparent color in the ColorEdit celltype, you have to use the custom celltype. This celltype as to be derived from the DropDownCellModel and DropDownCellRenderer. The DropDownCellModel class handles the serialization requirements for the control and creates the renderer class and the DropDownCellRenderer class handles the UI requirements of the cell. Kindly refer to the sample for more details. Let us know if you need further assistance, Regards, Madhan

Administrator [Syncfusion]
Replied On February 6, 2006 07:25 PM UTC

Thank you very much. -patrick

Jeong-Seok Yang
Replied On August 8, 2006 07:27 AM UTC

There is a bug in Sample provided at 2/3/2006 7:18:45 AM

I changed the Form1_Load like the below.
a few cells bacome to select color.
But If I click the colum select, all cells are
changed to a one last color.

How can I solve it!


private void Form1_Load(object sender, System.EventArgs e)
{
this.gridControl1.CellModels.Add("Color", new GridDropDownColorUICellModel1(this.gridControl1.Model));
this.gridControl1[3,3].CellType = "Color";
this.gridControl1[4,3].CellType = "Color";
this.gridControl1[5,3].CellType = "Color";
this.gridControl1[2,3].CellType = "Color";
this.gridControl1.DefaultColWidth = 80;
}

Administrator [Syncfusion]
Replied On August 8, 2006 10:37 AM UTC

Hi,

In the sample, please make the following changes to the OnPrepareViewStyleInfo override.

public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
{
if(e.Style.Text.Length > 0)
{
Color color = ColorConvert.ColorFromString(e.Style.Text);
e.Style.Interior = new BrushInfo(color);
}
}

Let us know if you need any further assistance.
Regards,
Rajagopal

Jeong-Seok Yang
Replied On August 8, 2006 03:11 PM UTC

even After Adding the codes,
still the problem exists.

After selecting one color by clicking the button,
Only clicking the new cell changes the cell color to the last clicked color.


ColorEdit_Transparent(2).zip

Administrator [Syncfusion]
Replied On August 9, 2006 09:09 AM UTC

Hi,

Please try calling the CurrentCell.EndEdit() method in the ChildClosing override to resolve this problem. Kindly refer to the attached sample that works fine with some small changes.
Here is the sample
ColorEdit_Sample.zip

Thanks for using Syncfusion Products.
Regards,
Rajagopal


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;