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
210
How to programmatically change MaxSelectedRecords?
posted

I am sure I can't bind MaxSelectedRecords, so what other options do I have to control the value of MaxSelectedRecords programmatically (not through code behind but through presentationmodel)?

Parents
No Data
Reply
  • 9836
    Verified Answer
    posted

    Actually, it is possible to bind the MaxSelectedRecords property to an integer property in your viewmodel by injecting datacontext. In order to do this, you would have to set the Source to your viewmodel as a StaticResource in the binding e.g.

    <igDP:FieldLayoutSettings

    MaxSelectedRecords="{Binding Source={StaticResource YourViewModel},

    Path=MaxSelectedRecords}"/>

    Hope this helps.

Children