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

Locating source for 'f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\Grid\GridActionAttribute.cs

5 Answers 75 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.
Dyana
Top achievements
Rank 1
Dyana asked on 04 May 2012, 10:35 AM
------EDIT-----

Bah, Friday morning stupidity. Of course that's the debugger telling me it can't find the file to debug it.

Amazing how the penny drops as soon as you make a forum post. Was missing the new GridModel part of:
return View(new GridModel(SessionProductRepository.All()));


-----ORIGINAL POST------

Hiya,

I'm following: http://demos.telerik.com/aspnet-mvc/razor/grid/editingserverside trying to setup batch serverside editing.

The above error "Locating source for 'f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\Grid\GridActionAttribute.cs" gets thrown when trying to populate the grid using the select method, decorated with the GridActionAttribute. The method itself gets called and runs, but as soon as it trys to return to the view, the above error is thrown.

I've seen this type of error before, generally meaning I'm missing a sub reference somewhere, but I am referencing the Telerik.Web.Mvc

the only information I'm finding on google is to the mention of the repository on codeplex: https://telerikaspnetmvc.svn.codeplex.com/svn/2011.Q2.712/Source/SharedFiles/SourceTfsSync.txt

it's an MVC 3 project and version Q1 2012, or 2012.1.214

Thanks
Dyana

5 Answers, 1 is accepted

Sort by
0
Tshering
Top achievements
Rank 1
answered on 10 May 2012, 09:51 AM
Hi Dyana,

I am having this same problem. I couldn't solve it. I have google the whole net still I haven't found any clue.

The error directly takes me to this: f:\114\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\Grid\GridActionAttribute.cs


My code:

[GridAction]
            public ActionResult Index()
            {
                Initiate_BiodataDb();

                return View(new GridModel
                {
                    Data = GetAll()
                });       
                
            }

public IQueryable<tblBiodata> GetAll()
            {
                Initiate_BiodataDb();

                var modle = _BiodataDb.tblBiodatas
                    .Select(x => new tblBiodata
                {
                    BiodataId = x.BiodataId,
                    Designation = x.Designation,
                    FullName = x.FullName,
                    Age = x.Age
                });
                return modle;

 If you happen to solve it please share with me.
0
Chillax
Top achievements
Rank 1
answered on 22 May 2012, 10:23 AM
Try with removing [GridAction] 
It work for me.
0
issam
Top achievements
Rank 1
answered on 05 Jun 2012, 08:54 AM
Any Solution for this issue?
0
issam
Top achievements
Rank 1
answered on 05 Jun 2012, 09:40 AM
This is due to the binding and the argument at the controller. 
0
Missing User
answered on 05 Jun 2012, 09:47 AM
I am also getting the same error. Cant see what I did wrong. I have the "new GridModel()" in my Controller Action:

Full Controller Action Bellow

[GridAction]
public ActionResult AjaxBinding()
{
    var clients = db.Clients.ToList();
    return View(new GridModel(clients));
}
Tags
Grid
Asked by
Dyana
Top achievements
Rank 1
Answers by
Tshering
Top achievements
Rank 1
Chillax
Top achievements
Rank 1
issam
Top achievements
Rank 1
Missing User
Share this question
or