Hi,
i have 2 igDataPicker, and a igGrid, i'm using version 2011.2, MVC3, my question is, how I can change the DataSourceUrl in runtime, because I need to spend the entire table, just information filtered by the dates DatePicker.
And another question, Can i refresh my grid, without refreshing the entire page?
thanks in advance.
Regards
please, i need this example, my sourde no work:
$(document).delegate("#gridTransferenciasEnviadas", "iggriddatabinding", function (evt, ui) { debugger; $("#gridTransferenciasEnviadas").data("igGrid").dataSource.settings.urlParamsEncoded = function (owner, params) { . . . // i get this data from html controls en my view: var parametros = "?pFechaInicio=" + fechaDesde + "&pFechaFinal=" + fechaHasta + "&pMontoDesde=" + montoDesde + "&pMontoHasta=" + montoHasta + "&pEntidadDestino=" + entidadDestino + "&pPaisDestino=" + pais + "&pEstados=" + estados + "&pMoneda=" + moneda + "&pReferenciaSINPE=" + referenciaSINPE + "&pIBANOrigen=" + ibanOrigen + "&pIBANDestino=" + ibanDestino + "&pIdOrigen=" + idOrigen + "&pIdDestino=" + idDestino + "&pReferenciaCanal=" + referenciaCanal; params.filteringParams.$filter = parametros; }; });
my problem is dataSource.settings.urlParamsEncoded no call
please help
I'm trying to do the same of what you speak in this post.Copy what you said here:
$('#grid1').igGrid('dataSourceObject', '/Prueba/PagingGetData');
$('#grid1').igGrid('dataBind');
But I get errors in the browser console.At the beginning, my grid is DataSourceUrl:
. DataSourceUrl (Url.Action ("PagingGetDataPais")). DataBind (). Render ())
And when I try to modify it in runtime, I get errors like:
Uncaught Error: There was an error parsing/evaluating the JSON string: Unexpected token / infragistics.js:51
To fix this error, remove the code:
Now when I try paging, and the application is debug, I see that is entering the url: "PagingGetDataPais".After changing the DataSourceObject, I make an alert in the code and I see that has changed, but does not enter the url: "PagingGetData"
Thanks in advance.
Best Regards
well completing the solution.
My controller look like this:
[HttpGet] public JsonResult Calculo(string fechainicio, string fechafin) { DateTime fechaInicio = Convert.ToDateTime(fechainicio); DateTime fechaFin = Convert.ToDateTime(fechafin);
//this line its only for execute a stored procedured db.spComisionesCalcular(fechaInicio, fechaFin);
// var calculo = this.busquedaFiltrada(fechaInicio, fechaFin); return Json(calculo, JsonRequestBehavior.AllowGet); }
i hope this help anyone.
Hi Angel.
I resolve it, i only need change the code in my json for this:
$.getJSON("/ComisionesCalculadas/Calculo",{ fechainicio: fInicio, fechafin: fFin },function (json) { $("#grid").igGrid("dataSourceObject", json);$("#grid").igGrid("dataBind");}, "json");
and that works.
thanks for all.
Christhian
Hi Christian,
What are you trying to achieve with his line?
$("#gridBusqueda").live('dataBind');
Probably you meant $("#gridBusqueda").igGrid("dataBind") ?
If it doesn't work, i suggest to contact Development support for a more indepth investigation of your issue, because i am not sure what could get wrong - the grid shouldn't have any compatibility issues with the MVC Partial Views.
Thank you,
Angel