Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
965
Fail with error that the key can not be null
posted

Hy guys,

Please tell me,how can I use a column in xamGrid, such that if i don't bind the column (Key=null), it will not fail with error that the key can not be null ? As far as I see, this error is encountered even if I have UnboundColumns... Please provide me an example, if it possible to avoid this situation.

Thanks,

Alin

 

Parents
No Data
Reply
  • 12631
    Verified Answer
    posted

    For most column types in the Grid, the Key property serves two purposes:

    1. Uniquly identifies a column within the grid
    2. Indicates what property in the ItemsSource the column is bound to

    UnboundColumn is an exception to this however, still requiring a Key but only using it to uniquly identify the column within the grid, not to connect it to an ItemSource property. 

    So althought its still required on UnboundColumns, it actually does not connect it to any data in the items source.

    Hope that helps.

    Devin

Children