joeharrison714 / MVCGrid.Net

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

Support Sessions #72

Open matagatoz opened 7 years ago

matagatoz commented 7 years ago

Hi, to properly support sessions ( as for refreshing and using session values in mvcgridconfig.cs to filter data or build the query ) the handler must implement IRequiresSessionState.

miltonblanco commented 7 years ago

Please,you can write more detail about how to implement the IRequiresSessionState.

Thanks,

matagatoz commented 7 years ago

Hi, on MVCGridHandler.cs it should be like this ( just add ", System.Web.SessionState.IRequiresSessionState")

namespace MVCGrid.Web { public class MVCGridHandler: IHttpHandler, System.Web.SessionState.IRequiresSessionState {

Thanks. Fernando

miltonblanco commented 7 years ago

Only those lines?

matagatoz commented 7 years ago

Yes, just Implement, using that and sessions will be maintained on grid actions. i've downloaded it, made that modification and im using it with no issues :D

On 12/8/2016 5:36 PM, miltonblanco wrote:

Only those lines?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joeharrison714/MVCGrid.Net/pull/72#issuecomment-265848105, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVEQUCMaqiGe3X7AkikKHoFWU58TYWoks5rGGo6gaJpZM4KFBDP.

miltonblanco commented 7 years ago

I have the following errors in MVCGridHandler.cs: on Init() bool showErrorDetails = ConfigUtility.GetShowErrorDetailsSetting(); //ConfigUtility not found

on HandleTable() var grid = MVCGridDefinitionTable.GetDefinitionInterface(gridName); // GetDefinitionInterface not Not found var options = QueryStringParser.ParseOptions(grid, context.Request); //QueryStringParser not found var gridContext = GridContextUtility.Create(context, gridName, grid, options); //Create method not found

miltonblanco commented 7 years ago

Ok I will download all the project.

misterbee180 commented 5 years ago

I have tested this and have found it to be working for maintaining session through paging. If anyone's having the issue of loss of session across pages this solution seems to fix it.