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
270
Forcing a value always to be the first in the grid column
posted

Hi,

I would like to have the entered value data[0]["cntRelation"] to be always = "Test" even when I enter new values to my grid.

Now when I edit my grid the new entry comes first (in the order of the ["cntRelation"]. What I want is I always want for the new entry to be the last in the order and the value "Test" always the first.

Below is the declaration of my igGrid 

$.ig.loader({
scriptPath: './js/',
cssPath: './css/',
resources: 'igGrid.*',
ready: function () {
$.getJSON("Home/GetAll", null, function (data) {

var headerTextValues = [, "Name", "Relation to Will maker"];
$('#contactGrid').igGrid({
expandCollapseAnimations: true,
animationDuration: 1000,
expandTooltip: "Expand to View Details",
collapseTooltip: "Hide details",
height: "400px",
width: "800px",
dataSource: data,
responseDataKey: "Records",
autoGenerateLayouts: false,
autoGenerateColumns: false, //to not generate all column and show only the ones i want to display
rowEditDialogContainment: "owner",
showReadonlyEditors: false,
columns: [
{ headerText: headerTextValues[0], key: "cntID", hidden: true },
{ headerText: headerTextValues[1], key: "cntAKA", width: 250, template: "<a href='Home/ManageContact?cntID=${cntID}&command=edit' class='editDialog'>${cntAKA}</a>" },
{ headerText: headerTextValues[2], key: "cntRelation", width: 250, template: "<a href='Home/ManageContact?cntID=${cntID}&command=edit' class='editDialog'>${cntRelation}</a>" },

],

initialDataBindDepth: -1,
primaryKey: 'cntID',
width: '800',
//updateURL: "Home/Update",


});
});
}
});

Thank you 

Regards

Sonia

Parents Reply Children