This is a migrated thread and some comments may be shown as answers.

GridViewColorColumn modifying RadColorDialog Colors

4 Answers 189 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Binu
Top achievements
Rank 1
Binu asked on 31 May 2016, 07:31 AM

I have RadGridView with GridViewColorColumn . The default color picker dialog is far more advanced than what i need. I just need to allow user to pick basic colors. I see a ENUMS in RadColorDialog  class such as ShowBasicColors, ShowSystemColors, ShowWebColors, ShowProfessionalColors. 

Question is, how do i modify this behavior from Grid?

 

i need to show only basic colors.

 

please help.

 

 

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 31 May 2016, 10:41 AM
Hello Binu,

Thank you for writing.

You can access the editor in the CellEditorInitialized event. For example:
private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    var editor = e.ActiveEditor as GridColorPickerEditor;
    if (editor != null)
    {
        var element = editor.EditorElement as GridColorPickerElement;
        RadColorDialogForm form = element.ColorDialog.ColorDialogForm as RadColorDialogForm;
        form.ShowCustomColors = false;
        form.ShowProfessionalColors = false;
        form.ShowSystemColors = false;
    }
}

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Yanick
Top achievements
Rank 1
answered on 07 Dec 2018, 02:29 AM

Hi,

 

Cannot find GridColorPickerElement

 

Could you help me please!

0
Dimitar
Telerik team
answered on 07 Dec 2018, 01:38 PM
Hello Yanick,

Now you should use RadColorPickerEditorElement instead.

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Yanick
Top achievements
Rank 1
answered on 07 Dec 2018, 04:14 PM
Very good thank you for your time!
Tags
GridView
Asked by
Binu
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Yanick
Top achievements
Rank 1
Yanick
Top achievements
Rank 1
Share this question
or