c# - Inheriting from JqGridHelper in Lib.Web.Mvc plugin to override a property keeps throwing errors -


i using lb.web.mvc plugin tpeczek , has been working great, have noticed in of grids seem overriding default value wanted permanently change these settings save self having type them out. according tpeczek way

deliver own jqgridoptions , use proper jqgridhelper

so first thing did @ stock jqgridhelper class , copy/past new class myjqgridhelper failed error

must declare body because not marked abstract, extern, or partial

here code using gave error:

public class jqgridhelper<tmodel> : ijqgridhelper {     public jqgridhelper(jqgridoptions<tmodel> options, object subgridhelper = null);      public jqgridhelper(string id = "grid", string afterinsertrow = null, string aftereditcell = null, string afterrestorecell = null, string aftersavecell = null, string aftersubmitcell = null, string altclass = "ui-priority-secondary", bool altrows = false, bool autoencode = false, bool autowidth = true, string beforerequest = null, string beforeselectrow = null, string beforeeditcell = null, string beforesavecell = null, string beforesubmitcell = null, string caption = null, int celllayout = 5, bool celleditingenabled = false, jqgridcelleditingsubmitmodes celleditingsubmitmode = jqgridcelleditingsubmitmodes.remote, string celleditingurl = null, string datastring = null, jqgriddatatypes datatype = jqgriddatatypes.json, bool deepempty = false, jqgridlanguagedirections direction = jqgridlanguagedirections.ltr, jqgriddynamicscrollingmodes dynamicscrollingmode = jqgriddynamicscrollingmodes.disabled, int dynamicscrollingtimeout = 200, string editingurl = null, string emptyrecords = "no resultes found.", bool expandcolumnclick = true, string expandcolumn = null, int? height = null, string errorcell = null, string formatcell = null, bool footerenabled = false, bool gridview = false, bool groupingenabled = false, jqgridgroupingview groupingview = null, bool headertitles = false, bool hidden = false, bool hiddenenabled = true, bool ignorecase = true, jqgridjsonreader jsonreader = null, string loadbeforesend = null, string loaderror = null, string loadcomplete = null, bool loadonce = true, jqgridmethodtypes methodtype = jqgridmethodtypes.get, jqgridmultikeys? multikey = null, bool multiboxonly = false, bool multiselect = false, int multiselectwidth = 20, bool multisort = false, string gridcomplete = null, string oncellselect = null, string ondoubleclickrow = null, string onheaderclick = null, string oninitgrid = null, string onpaging = null, string onrightclickrow = null, string onselectall = null, string onselectcell = null, string onselectrow = null, string onsortcol = null, bool pager = true, jqgridparametersnames parametersnames = null, object postdata = null, string postdatascript = null, string resizestart = null, string resizestop = null, string rowattributes = null, list<int> rowslist = null, int rowsnumber = 20, bool rowsnumbers = false, int rowsnumberswidth = 25, bool shrinktofit = true, int scrolloffset = 18, string serializecelldata = null, string serializegriddata = null, string serializesubgriddata = null, bool sortable = false, string sortingname = "", jqgridsortingorders sortingorder = jqgridsortingorders.asc, bool subgridenabled = false, jqgridsubgridmodel subgridmodel = null, object subgridhelper = null, string subgridurl = null, int subgridcolumnwidth = 20, string subgridbeforeexpand = null, string subgridrowcolapsed = null, string subgridrowexpanded = null, bool toppager = false, bool treegridenabled = false, jqgridtreegridmodels treegridmodel = jqgridtreegridmodels.nested, string url = null, bool userdataonfooter = false, bool viewrecords = true, int? width = null);      public string filtergridid { get; }      public string id { get; }      public string pagerid { get; }      public jqgridhelper<tmodel> addactionscolumn(string name, int position = 0, int width = 60, bool editbutton = true, bool deletebutton = true, bool useformediting = false, jqgridinlinenavigatoractionoptions inlineeditingoptions = null, jqgridnavigatoreditactionoptions formeditingoptions = null, jqgridnavigatordeleteactionoptions deleteoptions = null);      public jqgridhelper<tmodel> addnavigatorbutton(jqgridnavigatorbuttonoptions options);      public jqgridhelper<tmodel> addnavigatorbutton(string caption = "newbutton", string icon = "ui-icon-newwin", string onclick = null, jqgridnavigatorbuttonpositions position = jqgridnavigatorbuttonpositions.last, string tooltip = "", string cursor = "pointer", bool clonetotop = false);      public jqgridhelper<tmodel> addnavigatorseparator(jqgridnavigatorseparatoroptions options);      public jqgridhelper<tmodel> addnavigatorseparator(string @class = "ui-separator", string content = "", bool clonetotop = false);      public jqgridhelper<tmodel> filtergrid(list<jqgridfiltergridrowmodel> model = null, jqgridfiltergridoptions options = null);      public jqgridhelper<tmodel> filtertoolbar(jqgridfiltertoolbaroptions options = null);      public mvchtmlstring getfiltergridhtml();      public mvchtmlstring gethtml();      public mvchtmlstring getjavascript();      public mvchtmlstring getpagerhtml();      public mvchtmlstring gettablehtml();      public jqgridhelper<tmodel> inlinenavigator(jqgridinlinenavigatoroptions options);      public jqgridhelper<tmodel> navigator(jqgridnavigatoroptions options, jqgridnavigatoreditactionoptions editactionoptions = null, jqgridnavigatoreditactionoptions addactionoptions = null, jqgridnavigatordeleteactionoptions deleteactionoptions = null, jqgridnavigatorsearchactionoptions searchactionoptions = null, jqgridnavigatorviewactionoptions viewactionoptions = null);      public jqgridhelper<tmodel> setfooterdata(idictionary<string, object> data, bool useformatters = true);      public jqgridhelper<tmodel> setfooterdata(object data, bool useformatters = true);      public jqgridhelper<tmodel> setfrozencolumns();      public jqgridhelper<tmodel> setgroupheaders(ienumerable<jqgridgroupheader> groupheaders, bool usecolspanstyle = false); } 

i tried inherit base jqgridhelper , override once property wanted change gave me error must declare return type, have no idea since original jqgridhelper not return type either.

public class myjqgridhelper<tmodel>: jqgridhelper<tmodel> {     public jqgridhelper(string id = "grid",string afterinsertrow = null,string aftereditcell = null,string afterrestorecell = null,string aftersavecell = null,string aftersubmitcell = null,string altclass = "ui-priority-secondary",bool altrows = false,bool autoencode = false,bool autowidth = true,string beforerequest = null,string beforeselectrow = null,string beforeeditcell = null,string beforesavecell = null,string beforesubmitcell = null,string caption = null,int celllayout = 5,bool celleditingenabled = false,jqgridcelleditingsubmitmodes celleditingsubmitmode = jqgridcelleditingsubmitmodes.remote,string celleditingurl = null,string datastring = null,jqgriddatatypes datatype = jqgriddatatypes.json,bool deepempty = false,jqgridlanguagedirections direction = jqgridlanguagedirections.ltr,jqgriddynamicscrollingmodes dynamicscrollingmode = jqgriddynamicscrollingmodes.disabled,int dynamicscrollingtimeout = 200,string editingurl = null,string emptyrecords = "no resultes found.",bool expandcolumnclick = true,string expandcolumn = null,int? height = null,string errorcell = null,string formatcell = null,bool footerenabled = false,bool gridview = false,bool groupingenabled = false,jqgridgroupingview groupingview = null,bool headertitles = false,bool hidden = false,bool hiddenenabled = true,bool ignorecase = true,jqgridjsonreader jsonreader = null,string loadbeforesend = null,string loaderror = null,string loadcomplete = null,bool loadonce = true,jqgridmethodtypes methodtype = jqgridmethodtypes.get,jqgridmultikeys? multikey = null,bool multiboxonly = false,bool multiselect = false,int multiselectwidth = 20,bool multisort = false,string gridcomplete = null,string oncellselect = null,string ondoubleclickrow = null,string onheaderclick = null,string oninitgrid = null,string onpaging = null,string onrightclickrow = null,string onselectall = null,string onselectcell = null,string onselectrow = null,string onsortcol = null,bool pager = true,jqgridparametersnames parametersnames = null,object postdata = null,string postdatascript = null,string resizestart = null,string resizestop = null,string rowattributes = null,list<int> rowslist = null,int rowsnumber = 20,bool rowsnumbers = false,int rowsnumberswidth = 25,bool shrinktofit = true,int scrolloffset = 18,string serializecelldata = null,string serializegriddata = null,string serializesubgriddata = null,bool sortable = false,string sortingname = "",jqgridsortingorders sortingorder = jqgridsortingorders.asc,bool subgridenabled = false,jqgridsubgridmodel subgridmodel = null,object subgridhelper = null,string subgridurl = null,int subgridcolumnwidth = 20,string subgridbeforeexpand = null,string subgridrowcolapsed = null,string subgridrowexpanded = null,bool toppager = false,bool treegridenabled = false,jqgridtreegridmodels treegridmodel = jqgridtreegridmodels.nested,string url = null,bool userdataonfooter = false,bool viewrecords = true,int? width = null); } 

i tried change return type of tmodel brings me declare body error first getting. @ point lost on how heck supposed able inherit stock class able use own.

actually public jqgridhelper returning something, cant see code implemented in there. here link if want see full source code of jqgridhelper https://github.com/tpeczek/lib.web.mvc/blob/master/lib.web.mvc/jquery/jqgrid/jqgridhelper.cs. if have tool resharper, can decompile plugin , may see full source code. create custom constructor calling jqgridhelper class constructor , adding custom parameter. example:

public class myjqgridhelper<tmodel>: jqgridhelper<tmodel> {     public myjqgridhelper(string id="grid",string afterinsertrow = null,string aftereditcell = null,string afterrestorecell = null,string aftersavecell = null,string aftersubmitcell = null,string altclass = "ui-priority-secondary",bool altrows = false,bool autoencode = false,bool autowidth = true,string beforerequest = null,string beforeselectrow = null,string beforeeditcell = null,string beforesavecell = null,string beforesubmitcell = null,string caption = null,int celllayout = 5,bool celleditingenabled = false,jqgridcelleditingsubmitmodes celleditingsubmitmode = jqgridcelleditingsubmitmodes.remote,string celleditingurl = null,string datastring = null,jqgriddatatypes datatype = jqgriddatatypes.json,bool deepempty = false,jqgridlanguagedirections direction = jqgridlanguagedirections.ltr,jqgriddynamicscrollingmodes dynamicscrollingmode = jqgriddynamicscrollingmodes.disabled,int dynamicscrollingtimeout = 200,string editingurl = null,string emptyrecords = "no resultes found.",bool expandcolumnclick = true,string expandcolumn = null,int? height = null,string errorcell = null,string formatcell = null,bool footerenabled = false,bool gridview = false,bool groupingenabled = false,jqgridgroupingview groupingview = null,bool headertitles = false,bool hidden = false,bool hiddenenabled = true,bool ignorecase = true,jqgridjsonreader jsonreader = null,string loadbeforesend = null,string loaderror = null,string loadcomplete = null,bool loadonce = true,jqgridmethodtypes methodtype = jqgridmethodtypes.get,jqgridmultikeys? multikey = null,bool multiboxonly = false,bool multiselect = false,int multiselectwidth = 20,bool multisort = false,string gridcomplete = null,string oncellselect = null,string ondoubleclickrow = null,string onheaderclick = null,string oninitgrid = null,string onpaging = null,string onrightclickrow = null,string onselectall = null,string onselectcell = null,string onselectrow = null,string onsortcol = null,bool pager = true,jqgridparametersnames parametersnames = null,object postdata = null,string postdatascript = null,string resizestart = null,string resizestop = null,string rowattributes = null,list<int> rowslist = null,int rowsnumber = 20,bool rowsnumbers = false,int rowsnumberswidth = 25,bool shrinktofit = true,int scrolloffset = 18,string serializecelldata = null,string serializegriddata = null,string serializesubgriddata = null,bool sortable = false,string sortingname = "",jqgridsortingorders sortingorder = jqgridsortingorders.asc,bool subgridenabled = false,jqgridsubgridmodel subgridmodel = null,object subgridhelper = null,string subgridurl = null,int subgridcolumnwidth = 20,string subgridbeforeexpand = null,string subgridrowcolapsed = null,string subgridrowexpanded = null,bool toppager = false,bool treegridenabled = false,jqgridtreegridmodels treegridmodel = jqgridtreegridmodels.nested,string url = null,bool userdataonfooter = false,bool viewrecords = true,int? width = null)     : base (id,afterinsertrow,aftereditcell,afterrestorecell,aftersavecell,aftersubmitcell,altclass,altrows ,autoencode,autowidth,beforerequest,beforeselectrow,beforeeditcell,beforesavecell,beforesubmitcell,  caption, celllayout, celleditingenabled, celleditingsubmitmode,celleditingurl,datastring,datatype,deepempty,direction,  dynamicscrollingmode, dynamicscrollingtimeout, editingurl, emptyrecords, expandcolumnclick,  expandcolumn ,height, errorcell, formatcell, footerenabled, gridview, groupingenabled , groupingview, headertitles , hidden  ,  hiddenenabled , ignorecase , jsonreader , loadbeforesend , loaderror , loadcomplete , loadonce , methodtype , multikey , multiboxonly, multiselect , multiselectwidth , multisort , gridcomplete , oncellselect , ondoubleclickrow , onheaderclick , oninitgrid , onpaging , onrightclickrow , onselectall , onselectcell , onselectrow , onsortcol , pager , parametersnames , postdata , postdatascript , resizestart , resizestop , rowattributes , rowslist , rowsnumber , rowsnumbers , rowsnumberswidth , shrinktofit , scrolloffset , serializecelldata , serializegriddata , serializesubgriddata , sortable , sortingname , sortingorder , subgridenabled , subgridmodel , subgridhelper , subgridurl , subgridcolumnwidth , subgridbeforeexpand , subgridrowcolapsed , subgridrowexpanded , toppager  , treegridenabled , treegridmodel  , url , userdataonfooter , viewrecords ,  width )     {         //other stuff here, if want different after calling base constructor     } } 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -