Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
[URGENT] iggrid update url change not work
posted

Hi,

I work with iggrid and I have a very annoying problem with update url od grid. I try to modify the update url with javascript but it doesn't change the grid's url.

Here is my grid:

$('#man-grid-js').igGrid({

primaryKey: "SId",

autoGenerateColumns : false,

enableUTCDates : false,

localSchemaTransform : true,

renderCheckboxes: true,

updateUrl: '/Manual/SaveManual',

columns: [

{ headerText: "SId", key: "SId", dataType: "string", width: "15%" },

{ headerText: "SDate", key: "SDate", dataType: "date", width: "15%" }

],

features: [

{

name: 'Updating',

editMode: 'cell',

startEditTriggers: 'click',

enableDeleteRow : true,

enableAddRow : true

}

]

});

This grid has: '/Manual/SaveManual' as updateUrl

When I submit the form, I have to add an additional parameter to the url like '/Manual/SaveManual?type=12' and this additional parameter is calculated before sending.

I have my javascript to change the update url as below:

var grid = $("#man-grid-js");

var updateUrl = grid.igGrid("option", "updateUrl");  => I get '/Manual/SaveManual

updateUrl = updateUrl + "?type='" + selectedValue + "'";  => change to '/Manual/SaveManual?type=' + selected value

grid.igGrid({ updateUrl: updateUrl }) 

grid.igGrid("saveChanges", function saveSuccess(data) .....   => This doesn't recognize the new url but still takes the old one

Is that an infragistic bug or I did some mistake?

Thank you for your help