[URGENT] iggrid update url change not work

Not Answered This post has 0 verified answers | 2 Replies | 2 Followers Thread's RSS feed.

cem ozbas
Points 445
Replied On: Fri, Feb 3 2017 4:37 AM Reply

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

  • Post Points: 5

All Replies

cem ozbas
Points 445
Replied On: Fri, Feb 3 2017 5:04 AM Reply

Just for more information:

I use mvc and I have my action as below:

public ActionResult SaveManualTextbox(string type)


When I change manually the updateUrl it doesn't recognize the updateUrl.

I check with chrome and I always see that it try to post to the base url.

To summary:

Before change url it post to '/Manual/SaveManual'

After change url it still post '/Manual/SaveManual' instead of '/Manual/SaveManual?type=12'

  • Post Points: 20
[Infragistics]Tsanna
Points 14,385
Infragistics Employee
Replied On: Wed, Feb 8 2017 4:35 AM Reply

Hello cem,

You may try changing the update url on urlParamsEncoding event: http://www.igniteui.com/help/api/2016.2/ig.datasource#options:settings.urlParamsEncoding

Please let me know if this works for you.

Regards,

Tsanna

Associate Software Developer

  • Post Points: 5
Page 1 of 1 (3 items) | RSS