Server-side Templates + SqlDataSource

6 posts, 0 answers
  1. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 22 Jun Link to this post

    It is possible use Navigation - Server-side Templates together with asp:SqlDataSource?

    I want to add telerik:RadSearchBox in my Navigation and use SqlDataSource....

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    139 posts

    Posted 24 Jun Link to this post

    Hello Kjell,

    You can use this combination as long as you DataBind the items after they are loaded (e.g. set the SearchBox' DataSource in the Page_Load event handler). Please find attached a version of the Server Templates online demo modified to use SqlDataSource for the SearchBox.

    Regards,
    Peter Milchev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 30 Jun in reply to Peter Milchev Link to this post

    I explained a little bit bad.

    I want to use RadNavigation width Declarative Data Sources like SqlDataSource And 

    I want to add telerik:RadSearchBox in my RadNavigation and use SqlDataSource (Server-side Templates)....
  5. Peter Milchev
    Admin
    Peter Milchev avatar
    139 posts

    Posted 04 Jul Link to this post

    Hello,

    You could use the Declarative DataSource for the Navigation. The node that contains the SearchBox but the SearchBox' DataSource might need to be declared programmatically. You could use these articles for references:
    Regards,
    Peter Milchev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  6. Suvarna
    Suvarna avatar
    1 posts
    Member since:
    Aug 2013

    Posted 13 Sep Link to this post

    We are looking for a similar situation described by Kjell.

    The requirement , "Add a search Textbox" along with databound navigation is pretty common. How to achieve it  is not very clear from the above links.

    Can you provide some sample code on how to do it.

    Thanks

  7. Peter Milchev
    Admin
    Peter Milchev avatar
    139 posts

    Posted 16 Sep Link to this post

    Hello Suvarna,

    After reviewing the scenario again we would suggest another approach for implementing it. The approach is to:
    • Declare a Navigation node containing the SearchBox in the markup along the Navigation control and the DataSources
    • In the Page_load event handler
    1. Call the .DataBind() method of the Navigation
    2. Add the NavigationNode containing the SearchBox to the Navigation's node collection

    Please find attached a project implementing the described approach.

    Regards,
    Peter Milchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017