Drill down functionality stored procedure

3 posts, 0 answers
  1. Tim
    Tim avatar
    57 posts
    Member since:
    Oct 2013

    Posted 14 Jul 2014 Link to this post

    Dear Telerik,

    I'm following your demo on 

    My question is how can I modify my code to use stored procedure with parameter selection if I have a sqldatasource in the aspx page in front?

    Thanks for the assist.

    Best regards.
  2. Tim
    Tim avatar
    57 posts
    Member since:
    Oct 2013

    Posted 14 Jul 2014 in reply to Tim Link to this post

    Hi All,

    I figured to syntax which will be 

     public DataTable GetDataTable(string PivotFilter)
                String ConnString = ConfigurationManager.ConnectionStrings["Telerik"].ConnectionString;
                SqlConnection conn = new SqlConnection(ConnString);
                SqlDataAdapter adapter = new SqlDataAdapter();
                adapter.SelectCommand = new SqlCommand("SP_Telerik", conn);
                adapter.SelectCommand.CommandType = System.Data.CommandType.StoredProcedure;

                DataTable myDataTable = new DataTable();
                return myDataTable;

    However, my new problem is the myDataTable is always null, any thought?

  3. DevCraft R3 2016 release webinar banner
  4. Konstantin Dikov
    Konstantin Dikov avatar
    1755 posts

    Posted 17 Jul 2014 Link to this post

    Hello Tim,

    Thank you for contacting Telerik Support.

    I am glad to see that you were able to fix the initial issue.

    As for your new problem, since the data retrieval is not related to our controls in any way, the only thing that we can suggest is that you take a look at the following help articles and ensure that your stored procedure is correctly set:
    Hope this helps.

    Konstantin Dikov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top