Binding a Checkbox Column with a Byte Value 0 or 1

1 posts, 0 answers
  1. Vuyiswa
    Vuyiswa avatar
    188 posts
    Member since:
    Jan 2010

    Posted 30 Mar 2011 Link to this post

    Good Day

    I have a Gridview where i bind the list of values from my model. Now i have a bit field from the DB and it represents yes or no, or true or false using 1 and 0. Now i want to bind this to a Checkbox column and below is what i have

    <telerik:GridViewCheckBoxColumn  AutoSelectOnEdit="True"  DataMemberBinding="{Binding sIsMain,Mode=TwoWay}"></telerik:GridViewCheckBoxColumn>

    and it give me an Error when i run it.
    SCRIPT5022: Unhandled Error in Silverlight Application
    Code: 4004   
    Category: ManagedRuntimeError      
    Message: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
       at System.ThrowHelper.ThrowKeyNotFoundException()
       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)

Back to Top