none
Object Data source - Calling Select method from the code not passing SortParameter Value to business class method RRS feed

  • Question

  • Hi,

     

    I'm trying to call Object Data Source Select method from my code. Before calling the select method I’m giving the value(default) value to the select parameters.

    However the assigned values are not passed to the business class method for the parameters that are mapped as SORTPARAMETER, STARTROWINDEXPARAMETER and MAXIMUMROWSPARAMETER.

     

    My code looks like below:

    objODS.SelectParameter["startrowIndex"].DefaultValue = "0";

    objODS.SelectParameter["maxRows"].DefaultValue = "0";

    objODS.SelectParameter["sortOn"].DefaultValue = "SomeFieldName";

    gv.DataSource = objODS.Select();

     

    and this ODS Select method is mapped to below method in my business class

    public List<Exams> GetExams(startrowIndex, maxRows, sortOn )

    {

    ///

    }

     

    However the values assigned above are not passed to the above method, if I call the ODS select method from my code.

     

    How do we resolve this issue? I have to call the select method directly for some reasons.

     

    Regards,

    SS Anand

     

     

    Saturday, January 19, 2008 12:41 PM