Hi,
Currently i am using iggrid in my angular 2 project , i am getting following issues while implementing iggrid in my project
1).on iggrid, i have a button called viewparcels, currently when i have click on viewparcels button editbox get invoked, in my case it should not be invoke when i would click on that button, but when i would click on other cell values then editbox should get invoke. Please check below screenshot
2).i have called function RedirectParcel on viewparcels button click event, but when i click on button , its giving the following error. Uncaught ReferenceError: RedirectParcel is not defined at HTMLInputElement.onclick Please check below screenshot
3). i am using generatePrimaryKeyValue: function (evt, ui) for getting new id while adding new row, but its not working properly. For e.g i have 3 rows with ID:175,177,179 . in this case when i click on add new row,the new id should be 180, but it returning new ID is 176.
Please Find below screenshot
Thanks,
Yogesh
Hello Yogesh,
Ok, if you need further assistance let us know.
Hi DeyanK ,
Thank for reply,
I will try to implement what you suggest,if there is still i will get back you
1) Clicking on any cell will trigger editing, when you are in edit mode row. You can bind to editRowStarting and cancel the editing when the current target is the ViewParcel column.
features:[
{
name: "Updating",
editRowStarting: function(evt, ui){
if($(evt.currentTarget).attr("aria-describedby") === ui.owner.element.attr("id") + "_ViewParcel") {
return false;
}
},
columnSettings: [
{ columnKey: "ViewParcel", readOnly: true }
]
2) Function RedirectParcel is expected to be defined as global function. Make sure it is defined and it is defined globally.
3) From generatePrimaryKeyValue API docs you can see that the ui.value is auto-generated in the following way - the number of records in the data source + 1
If your primaryKey values are not auto-incrementing you can specify them as ui.value
For example:
generatePrimaryKeyValue: function(evt, ui) {
//specify it however you want, just make sure they are unique
window['yourOwnPK'] = window['yourOwnPK'] ? window['yourOwnPK'] : 180;
ui.value = window['yourOwnPK']++;