Problems with custom cell template

4 posts, 0 answers
  1. Mads
    Mads avatar
    25 posts
    Member since:
    Nov 2014

    Posted 06 Jan 2015 Link to this post

    I have trouble with creating a custom cell template for my custom filtering

    I have the following xaml file
    http://pastebin.com/12MYWM6J

    And this codebehind
    http://pastebin.com/c0JVMnQU

    And this is my custom type
    http://pastebin.com/LFnGynbz

    My problem is that if I do not comment out 

    <telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn.CellTemplate>
            <DataTemplate>
                <CheckBox Checked="{Binding Path=Checked}" Content="{Binding Text}"/>
            </DataTemplate>
        </telerik:GridViewDataColumn.CellTemplate>
    </telerik:GridViewDataColumn>


    Then my application throws an exception
    {"Unable to cast object of type 'System.Reflection.RuntimeEventInfo' to type 'System.Reflection.MethodInfo'."}

    If I do comment it out then it runs fine, but it looks wrong, I dont want

    <telerik:GridViewDataColumn
        DataMemberBinding="{Binding Path=Checked}"/>
    <telerik:GridViewDataColumn
        IsReadOnly="True"
        DataMemberBinding="{Binding Path=Text}"/>


    I want the checkboxes I create in my radgridview to align with the one in top
    <CheckBox Content="{x:StaticExtension localization:SemenBucketTexts.SelectAll}" Click="SelectAll" />
  2. Mads
    Mads avatar
    25 posts
    Member since:
    Nov 2014

    Posted 06 Jan 2015 in reply to Mads Link to this post

    Sorry for the double post, I got an error when I posted the first
  3. Mads
    Mads avatar
    25 posts
    Member since:
    Nov 2014

    Posted 06 Jan 2015 Link to this post

    I have found a solution to this
  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1217 posts

    Posted 06 Jan 2015 Link to this post

    Hello,

    I believe that you have tried to bind Checked (event), instead of IsChecked (property). I am glad that you have solution though. Feel free to write back to us if you need any additional help.

    Regards,
    Ivan Ivanov
    Telerik
     

    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.

     
Back to Top