Dear all,
I am planning to use ultracolorpicker but don't know whether it is better.
I want to save the color code and it will show in ultragrid background.
Is there any sample code?
Hello,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
You could do it that way, or you could just use the Color property.
this.ultraColorPicker1.Color = Color.FromArbg(colorAsInt);
this.ultraColorPicker1.Color.ToArgb();
The advantage to use the Value property is that Value can be null (or DBNull), but Color cannot.
Dear Mike,
How to set and get the value to or from this.ultracolorpicker1.value???
((Color)this.ultracolorpicker1.value).ToArgb() ???
The ColorPicker has no way to translate a string into a color. Do you have to store the color as a string? Personally, I would use an ARGB value (an integer).
To get the ARGB value for a color, you can use:
color.ToArgb()
To get a color from an ARGB value, you use:
Color.FromArgb(argb);
Actually I have ultracolorpicker control on the win form.
I have below command assigned to the variable and saved in db.
string color= this.ultraColorPicker1.Value.ToString();
When I assign back, the ultracolorpicker does not show assigned color. Do you know why??
this.ultraColorPicker1.Value=color;