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

[Solved] How To Load TeleRik JS and Css Files via ComBres.Xml

0 Answers 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
RajeshKumar
Top achievements
Rank 1
RajeshKumar asked on 26 Jun 2012, 03:30 PM
Hi all.,

           Im trying to display a Telerik Html Grid with Filler option and Page Navigation.If i add alll the script, reference and css folders with in the same area of solution the grid is working fine.

         But Actually my Media folder is in my Local Host Folder not in my Solution folder.If the Script folder is with in Solution then Telerik is working fine.my solution is in different folder and my files are in different kind of folder the same time the css and js files also loading from different folder.I tried to load with Global.asax.cs

    like this:

           protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
            Telerik.Web.Mvc.WebAssetDefaultSettings.ScriptFilesPath = "~/D:\\Project4\\Media\\Solution\\includes\\telerik\\telerikJs\\";
            Telerik.Web.Mvc.WebAssetDefaultSettings.ScriptFilesPath = "~/D:\\Project4\\Media\\Soultion\\telerikCss\\";
         }

if i hard code like this while loading my aspx page is loading fine.But i checked the path via firebug because the files are not loaded properly.After loading the page the file path is coming like this..,
localhost:87879:D:\\Project4\\Media\\Solution\\includes\\telerik\\telerikJs\\telerik.1.4.3.js.

Can any one pls tell me how to load the Telerik grid Js files and Css file using Combres.Xml file.

In aspx page im doing like this: Sample:
Grid Code:

 <%= Html.Telerik().Grid(Model.TrainDisruptionDetailsList)
                        .Name("Grid")

Script to load a grid:

     function onDataBound() {
            var grid = $(this).data('tGrid');
            var currentPage = grid.currentPage;
            var orderBy = grid.orderBy;
            var groupBy = grid.groupBy;
            var filterBy = grid.filterBy;

            $('#currentPage').val(currentPage);
            $('#orderBy').val(orderBy);
            $('#groupBy').val(groupBy);
            $('#filterBy').val(filterBy);
        }
<%= Html.Telerik().StyleSheetRegistrar()   %>
<%= Html.Telerik().ScriptRegistrar() %>


Thanks & Regards.,

RajeshKumar.K


Tags
Grid
Asked by
RajeshKumar
Top achievements
Rank 1
Share this question
or