This is a migrated thread and some comments may be shown as answers.

Server-side Templates + SqlDataSource

5 Answers 69 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Iron
Kjell asked on 22 Jun 2016, 08:09 AM

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

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

5 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 24 Jun 2016, 02:22 PM
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.
0
Kjell
Top achievements
Rank 1
Iron
answered on 30 Jun 2016, 09:57 AM

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)....
0
Peter Milchev
Telerik team
answered on 04 Jul 2016, 11:58 AM
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.
0
Suvarna
Top achievements
Rank 1
answered on 13 Sep 2016, 07:03 PM

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

0
Peter Milchev
Telerik team
answered on 16 Sep 2016, 02:52 PM
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.
Tags
Navigation
Asked by
Kjell
Top achievements
Rank 1
Iron
Answers by
Peter Milchev
Telerik team
Kjell
Top achievements
Rank 1
Iron
Suvarna
Top achievements
Rank 1
Share this question
or