Slickgrid, confirm before edit
Posted
by
Evan
on Stack Overflow
See other posts from Stack Overflow
or by Evan
Published on 2013-07-02T22:23:30Z
Indexed on
2013/07/02
23:05 UTC
Read the original article
Hit count: 241
I am making a slick grid and need the ability to add rows with a code column. For this to be possible the code column needs to be editable for the entire table.
I am trying to work out a way that I can confirm the edit with a standard javascript confirm popup box. I tried putting one into the onedit event within the slickgrid constructor and that executed after the edit.
I am led to believe that the edit function is independent from calling the edit stored procedure of the database. Is there a better way to go about this?
RF_tagsTable = new IndustrialSlickGrid(
LadlesContainerSG
, {
URL: Global.DALServiceURL + "CallProcedure"
, DatabaseParameters: { Procedure: "dbo.TableRF_tags" , ConnectionStringName: Global.ConnectionStringNames.LadleTracker }
, Title: "RF tags"
, Attributes: {
AllowDelete: true
, defaultColumnWidth: 120
, editable: true
, enableAddRow: true
, enableCellNavigation: true
, enableColumnReorder: false
, rowHeight: 25
, autoHeight: true
, autoEdit: false
, forceFitColumns: true
}
, Events: {
onRowEdited : rowEdited
/*function(){ //this is my failed attempt
var r=confirm("Edit an existing tag?")
if (r){
alert(r);
} else {
alert(r);
}
}*/
, onRowAdded : rowAdded
}
});
© Stack Overflow or respective owner