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

Problems with custom cell template

3 Answers 186 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mads
Top achievements
Rank 1
Mads asked on 06 Jan 2015, 09:25 AM
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" />

3 Answers, 1 is accepted

Sort by
0
Mads
Top achievements
Rank 1
answered on 06 Jan 2015, 09:26 AM
Sorry for the double post, I got an error when I posted the first
0
Mads
Top achievements
Rank 1
answered on 06 Jan 2015, 04:11 PM
I have found a solution to this
0
Ivan Ivanov
Telerik team
answered on 06 Jan 2015, 05:10 PM
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.

 
Tags
GridView
Asked by
Mads
Top achievements
Rank 1
Answers by
Mads
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Share this question
or