Hello, I still need your help, and more specifically the implementation of the ExtJS grid.
I can not make it work.
I have a View that makes a search with more parameters, then the controller will have the action research that when loading the page I set the controls of the latter, and then I post the action through which I search. This is the code:
[Authorize (Roles = "OP_Bollettino")]
[AcceptVerbs (HttpVerbs.Get)]
Search public ActionResult ()
(
Viewdata [ "checksurname"] = "false";
abilitatosur.Add ( "Disabled" "Disabled");
Viewdata [ "abilitasur"] = abilitatosur;
Viewdata [ "checkcf"] = "false";
abilitatocf.Add ( "Disabled" "Disabled");
Viewdata [ "abilitacf"] = abilitatocf;
abilitatocaus.Add ( "Disabled" "Disabled");
Viewdata [ "checkcausale"] = "false";
Viewdata [ "abilitacaus"] = abilitatocaus;
Viewdata [ "selection"] = "Select";
string EndDate = null;
string StartDate = null;
DataFire DateTime.Now.Date.AddDays = (-30);
EndDate = dataf.ToShortDateString ();
data = DateTime.Now.Date;
StartDate = datai.ToShortDateString ();
Viewdata [ "StartDate"] = EndDate;
Viewdata [ "EndDate"] = StartDate;
Viewdata [ "Cause"] = causale.GetListaCausaleDropDown ();
return View ( "Search");
)
/ / /
/ / / Implementation of research, and more precisely when the operator clicking on the button passes the parameters
/ / / Will be used to build the Linq query and return the results in the grid.
/ / /
/ / /
/ / /
/ / /
/ / /
/ / /
/ / /
[Authorize (Roles = "OP_Bollettino")]
[AcceptVerbs (HttpVerbs.Post)]
[LogError]
public JsonResult Research (FormCollection formcoll)
(
DateTime date = DateTime.Now.Date.AddDays (-30);
data.ToShortDateString EndDate = string ();
data.Date.ToShortDateString ();
string StartDate = DateTime.Now.Date.ToShortDateString ();
date = DateTime.Parse (Request.Form [ "StartDate"]. ToString (). Trim ());
DataFire = DateTime.Parse (Request.Form [ "EndDate"]. ToString (). Trim ());
Viewdata [ "StartDate"] = datai.ToShortDateString ();
Viewdata [ "EndDate"] = dataf.ToShortDateString ();
TRY
(
var search = utente.GetBollettinoBySearch (null, 0, date, DataFire, null);
if (String.IsNullOrEmpty (Request.Form [ "Surname"]))
(
Viewdata [ "checksurname"] = true;
abilitatosur.Add ( "enabled", "enabled");
Viewdata [ "abilitasur"] = abilitatosur;
Viewdata [ "cog"] = Request.Form [ "Surname"]. Trim (). ("''", Replace "");
name = Request.Form [ "Surname"]. Trim (). ("''", Replace "");
utente.GetBollettinoBySearch search = (name, 0, date, DataFire, null);
)
else
(
Viewdata [ "checksurname"] = "false";
abilitatosur.Add ( "Disabled" "Disabled");
Viewdata [ "abilitasur"] = abilitatosur;
)
if (String.IsNullOrEmpty (Request.Form [ "Cause"]))
(
Viewdata [ "checkcausale"] = "true";
abilitatocaus.Add ( "enabled", "enabled");
Viewdata [ "abilitacaus"] = abilitatocaus;
Viewdata [ "selection"] = "Select";
id_causale string = Request.Form [ "Cause"];
utente.GetBollettinoBySearch search = (null, int.Parse (id_causale), date, DataFire, null);
var selectcasuale = causale.GetListaCausaleDropDown (). ToList ();
Viewdata [ "Reason"] = new SelectList (selectcasuale.ToList (), "Value", "Text", id_causale), / / new MultiSelectList (causale.GetListaCausaleDropDown (), "Value", "Text", selected);
)
else
(
abilitatocaus.Add ( "Disabled" "Disabled");
Viewdata [ "checkcausale"] = "false";
Viewdata [ "abilitacaus"] = abilitatocaus;
Viewdata [ "selection"] = "Select";
var selectcausale = causale.GetListaCausaleDropDown (). ToList ();
Viewdata [ "Reason"] = new SelectList (selectcausale.ToList (), "Value", "Text", 0);
)
if (String.IsNullOrEmpty (Request.Form [ "codiceF"]))
(
abilitatocf.Add ( "enabled", "enabled");
Viewdata [ "abilitacf"] = abilitatocf;
Viewdata [ "checkcf"] = true;
Viewdata [ "cf"] = Request.Form [ "codiceF"]. Trim (). ("''", Replace "");
cf = Request.Form [ "codiceF"]. Trim (). ("''", Replace "");
utente.GetBollettinoBySearch search = (null, 0, date, DataFire, cf); / / res.WithCf (cf);
)
else
(
Viewdata [ "checkcf"] = "false";
abilitatocf.Add ( "Disabled" "Disabled");
Viewdata [ "abilitacf"] = abilitatocf;
)
return JSON (datastore = new (search));
)
catch (Exception ex)
(
Utilita.LogError (ex);
return JSON ( "Search");
)
)
I have tested a JavaScript debugger and load the page when I enter the debug extjs grid, even though I click the search button to search back to me the contents of the query in notepad format and I do not even enter into debbugger javascript.
I can help you understand why, I tried it with several examples of extjs but does not work.
Thanks
View Full Details...............................

First Things First: Create a Custom Error Page