how to print multivalue parameter in textbox

3 posts, 0 answers
  1. Lukasz
    Lukasz avatar
    21 posts
    Member since:
    Aug 2014

    Posted 12 Sep 2014 Link to this post

    Hi,

    I have multvalue parameter with available values connected to ObjectDataSource:

    IEnumerable<int> GetMonths()

    Now I am trying to display first value from that list in TextBox:

    {=First(Parameters.Months.Value)}

    This renders as empty.

    But this works:

    { = Join(",",Parameters.Months.Value)}

    How can I use agregate fuctions on multivalue parameters?

    Thanks,
    Łukasz
  2. KS
    KS avatar
    165 posts
    Member since:
    Oct 2012

    Posted 17 Sep 2014 in reply to Lukasz Link to this post

    Hi,

    As far as I know the Parameters.Param.Value of multivalued parameter is a System.Object[], and is not operating as a standard field. Probably a user function can get the needed value, just pass the Parameters.Param.Value or Parameters.Param.AvailableValues and cast it.

    -KS
  3. DevCraft banner
  4. Lukasz
    Lukasz avatar
    21 posts
    Member since:
    Aug 2014

    Posted 17 Sep 2014 in reply to KS Link to this post

    Yes, thanks.

    I finally ended using user functions to extract everything what I need from multivalue parameters.
Back to Top