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

GridView checkbox

3 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 06 Jun 2012, 01:20 PM
Hi,

I have a project with the Metro theme, In the project I created sample data and used this as the itemsource for the RadGridView.
The data has boolean data and is shown as a checkbox in the grid.

Now I wanted to change the appearance of the checkbox and adjusted the GridViewCheckbox.xaml file. But it is not showing the changes.
When I change the system.windows.checkbox.xaml changes are shown.

Why is it using the system.windows.checkbox.xaml ? When does it use the gridviewcheckbox.xaml ?

Thanks in advance,

Richard Bergmans

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 06 Jun 2012, 01:27 PM
Hello Richard,

 

GridViewCheckBox is specially designed for RadGridView. Indeed it is pretty strange that the changes are not applied automatically and we are currently investigating this case. As a kind of workaround I may suggest you to predefine the CellTemplate/CellEditTemplates of GridViewDataColumn and place the standard CheckBox which will take its styles from our Telerik Metro theme. 




Regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Vanya Pavlova
Telerik team
answered on 06 Jun 2012, 02:51 PM
Hello Richard,

 
For those clients who might be interested in your case I am pasting the answer here: 
GridViewCheckBox appears only and if only when you use GridViewCheckBoxColumn. If your column is GridViewDataColumn bound to boolean property the standard CheckBox appeared. 
By that reason within your project the GridViewCheckBox style does not affect at all.
Thank you!  
  


Kind regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Richard
Top achievements
Rank 1
answered on 09 Jan 2013, 04:03 PM
Hi,

I have edited the cell template and added a standard checkbox. But it does not takes it styles from the Metro theme project I have in my solution. Should it have taken the style from the System.Windows.CheckBox.xaml file ?

I can not attach my solution and my support for my 30 days trial has also expired.
Below is how my gridview column is done. And I also attached a image with a red oval which shows this checkbox.
<telerik:GridViewDataColumn Header="Checked" DataMemberBinding="{Binding Checked}">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <CheckBox IsChecked="{Binding Checked}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <CheckBox IsChecked="{Binding Checked}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

What should I do to make this checkbox get its style from my Metro project ?
Any help appreciated.

Regards,

Richard

Tags
GridView
Asked by
Richard
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Richard
Top achievements
Rank 1
Share this question
or