How can I put a ColorPicker component inside a SfDatagrid column/cell ?

Hi, is there an example how to put a ColorPicker component inside a particular SfDatagrid column (in WPF) ?


1 Reply

VS Vijayarasan Sivanandham Syncfusion Team July 28, 2021 07:54 PM UTC

Hi Silvio,

Thank you for contacting Syncfusion Support.

Your requirement can be achieved by loaded the ColorPicker has CellTemplate in GridTemplateColumn in SfDataGrid. Please refer the below code snippet, 
<syncfusion:GridTemplateColumn MappingName="CustomerID" HeaderText="Color Picker" > 
                    <syncfusion:GridTemplateColumn.CellTemplate> 
                        <DataTemplate> 
                            <syncfusion:ColorPicker  Brush="{Binding CustomerID}" /> 
                        </DataTemplate> 
                    </syncfusion:GridTemplateColumn.CellTemplate>                 </syncfusion:GridTemplateColumn> 

For more information related to GridTemplateColumn, please refer the user guide documentation, 
Please let us know if you have any concerns in this.

Regards,
Vijayarasan S 


Loader.
Up arrow icon