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
4341
CellValuePresenter.FromCell method returns null
posted

Hi Support

We are using xamDataGrid 12.1.20121.2314 version in our application. We have a datasource assigned to the xamDataGrid and also have added unbound column to it. A CellValuePresenter style with image as content is assigned to the unbound column. We have a requirement wherein we have to set the visibility of the image present in the CellValuePresenter style, however the method CellValuePresenter.FromCell returns null. We have also set the AllowCellVirtualization property of the xamDataGrid field settings to false but it still doesn’t seem to work.

We have attached sample code for your reference. Please let us know to get the CellValuePresenter generated.

XamComboBinding.zip
  • 138253
    Offline posted

    Hello,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.

  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I can say that this behavior is expected, because by the time you call the FromCell method the CellValuePresenters are not created yet. This is why I can suggest you use a Converter in order to control the image visibility. You can bind the Visibility of the Image to the Country Property and by using a converter you can return Visible or Hidden. I modified the sample, using this approach, so now everything works as you want. Please let me know if you need further clarification on this matter.

     

    Looking forward for your reply.

    XamComboBindingModified.zip