Rad GridView Checkbox where text should be...

3 posts, 0 answers
  1. Richard
    Richard avatar
    10 posts
    Member since:
    Dec 2014

    Posted 16 Jan 2015 Link to this post

    I'm thoroughly confused.. Please help.
    Then following xaml displays two columns of text, followed by two columns of checkboxes... But you can see that the third column, "tight Hole" does not define a checkbox style. I removed the cell header style also, and I still have a checkbox column there! What am I doing wrong? 

         <telerik:GridViewDataColumn Header="Property ID" DataMemberBinding="{Binding PropertyID}"              IsReadOnly="True" HeaderCellStyle="{StaticResource HeaderStyle}" Width="100" TextAlignment="Left" />
           <telerik:GridViewDataColumn Header="Property Name" DataMemberBinding="{Binding Property.PropertyName}" IsReadOnly="True" HeaderCellStyle="{StaticResource HeaderStyle}" Width="200" TextAlignment="Left" />
           <telerik:GridViewDataColumn Header="Tight Hole" DataMemberBinding="{Binding Property.TightHole}"       IsReadOnly="True" Width="100" TextAlignment="Left"  />
            <telerik:GridViewCheckBoxColumn Header="Read Only" DataMemberBinding="{Binding ReadOnly}"              IsReadOnly="False" HeaderCellStyle="{StaticResource HeaderStyle}" Width="100" CellStyle="{StaticResource StyleChkBoxCenter}" />

    Just for FYI purposes, I define the Grid like this: 

    <telerik:RadGridView x:Name="gvProperties" Grid.Row="2" 
                                                     ItemsSource="{Binding WellAssignments}"
                                                     AutoGenerateColumns="False" CanUserFreezeColumns="False" 
                                                     CanUserDeleteRows="True" CanUserInsertRows="False" ShowGroupPanel="False" 
                                                     IsFilteringAllowed="False" IsReadOnly="False"

    The attached images show what I have and what I need. I need that third column to be text!

  2. Vanya Pavlova
    Vanya Pavlova avatar
    2019 posts

    Posted 19 Jan 2015 Link to this post

    Hello Richard,

    The checkboxes are automatically generated, based on underlying data type. Perhaps you have defined either a data column or check box column in code behind. What you may do is to predefine the CellTemplate of the third column, bind the TextBlock's TextProperty to this boolean value. Then through a converter return the corresponding value either "True" or "False". 

    You could read more about this in our documentation, here. 

    Vanya Pavlova

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft banner
  4. Richard
    Richard avatar
    10 posts
    Member since:
    Dec 2014

    Posted 19 Jan 2015 in reply to Vanya Pavlova Link to this post

    Thank you. I'm doing exactly that this morning! I suspected that checkboxes were automatically generated after having manual define checkboxes early in this project. (the automatic generation wasn't working and then it started working after I need to convert tight hole back to a string - weird!!!)

    Thanks again!

Back to Top