joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

"There is already a grid definition with the name 'MVCGridDefinitionTable'." #50

Open benjduartejr opened 8 years ago

benjduartejr commented 8 years ago

error using mvc grid...pls help. thank you

dterracino commented 8 years ago

I am having the same issue. Whatever I change the name to in MVCGridConfig.cs, it fails in RegisterGrids() on the MVCGridDefinitionTable.Add() call, giving me an error saying that "there is already a grid definition with the name". Have you resolved this yet?

dgarridor commented 8 years ago

Hello, I had the same error. Just remove line "MVCGridConfig.RegisterGrids ();" of the Global.asax This solved the problem.

shefaliA commented 8 years ago

Make sure that MVCGridDefinitionTable.Add() is used once through the application life cycle .If RegisterGrids() is called in Global.asax and you also have [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(ATCDWebUI.MVCGridConfig), "RegisterGrids")] on top of MVCGridConfig.cs then you will get this error.

fredbainbridge commented 6 years ago

The problem started happening after I renamed the project and folders. Deleting /bin fixed this issue for me.