GridView checkbox

4 posts, 0 answers
  1. Richard
    Richard avatar
    9 posts
    Member since:
    Apr 2012

    Posted 06 Jun 2012 Link to this post

    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
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 06 Jun 2012 Link to this post

    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 >>

  3. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 06 Jun 2012 Link to this post

    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 >>

  4. Richard
    Richard avatar
    9 posts
    Member since:
    Apr 2012

    Posted 09 Jan 2013 Link to this post

    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

Back to Top