This question is locked. New answers and comments are not allowed.
Hello
i have a datagrid and a serach form
following searching dates i display the content of datagird and a map (google map).
for example i have: 100 records
when i do search --> i have found 15 records.
So i get 15 markers in google map
and 15 results in datagrid
the problem is when i click in page "2", records go back to 100 records.
Controller
Date picker (search)
Datagrid
i have a datagrid and a serach form
following searching dates i display the content of datagird and a map (google map).
for example i have: 100 records
when i do search --> i have found 15 records.
So i get 15 markers in google map
and 15 results in datagrid
the problem is when i click in page "2", records go back to 100 records.
Controller
public ActionResult Index(){ var localisations = localisationRepo.GetDernierEmplacementConnu(); return View(localisations); } [HttpPost] public ActionResult Index(DateTime minDate, DateTime maxDate) { var localisations = localisationRepo.GetDernierEmplacementConnuParIntervalleDate(minDate,maxDate); return View(localisations); }Date picker (search)
<!--Calendar-->@using (Html.BeginForm()){ <label for="minDate">rechercher entre</label> @(Html.Telerik().DatePicker() .Name("minDate") .Value(DateTime.Now).Max(DateTime.Now).Min(("01/01/2012")) ) <label for="maxDate">et</label> @(Html.Telerik().DatePicker() .Name("maxDate") .Value(DateTime.Now).Max(DateTime.Now).Min(("01/01/2012")) ) <button type="submit" class="t-button t-state-default" value="search">Rechercher</button>} <!--fin calendar-->Datagrid
<!-- Data Grid-->@(Html.Telerik().Grid(Model) .Name("Grid").Localizable("fr-FR") .Resizable(resizing => resizing.Columns(true)) .Reorderable(reorder => reorder.Columns(true)) .Columns(columns => { columns.Bound(o => o.Date).Format("{0:d/M/yyyy}").Width(100); columns.Bound(o => o.LatitudeDecimal).Width(140); columns.Bound(o => o.LongitudeDecimal).Width(140); columns.Bound(o => o.Vitesse); columns.Bound(o => o.Heading); columns.Bound(o => o.Odometer); columns.Bound(o => o.Idle_time); columns.Bound(o => o.Event_id); columns.Bound(o => o.input_status); columns.Bound(o => o.BoitierGps.UnitId).Title("Id Boitier"); }).ClientEvents(events => events.OnDataBound("onDataBound")) .Filterable() .Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn)) .Pageable() .Scrollable(scrolling => scrolling.Height(250)) .Scrollable() ) <!--Fin Data Grid-->