Forum



15:40

10/08/2009

The answer on your question depends on how you use delGridRow: directly of indirectly (per navGrid for example). In general you can include in the list of delGridRow options any options from $.jgrid.del inclusive msg. So you can sure
delGridRow(rowId, {msg: "Are you sure you want to delete BlaBlaBla?"});
you can also set msg parameter of delGridRow as a part of prmDel parameter of the navGrid function.
If you want to have the text absolutely dynamically you will probably have to use beforeShowForm event handle of the delGridRow.
Best regards
Oleg
00:35

25/02/2010

I apriciate your response, but I'm just as confused.
I'm trying to figure out how to add the row id and then maybe some cell text to the "msg:" statement.
Thanks,
tom
{edit:false,view:true}, //options
{}, // edit options
{height:290,reloadAfterSubmit:false,jqModal:false, closeOnEscape:true,bottominfo:"Fields marked with (*) are required", closeAfterAdd: true}, // add options
{reloadAfterSubmit:true,jqModal:true, closeOnEscape:true, caption: "Delete...", msg: "Delete me now!"+rowid}, // del options
{closeOnEscape:true}, // search options
{height:250,jqModal:false,closeOnEscape:true} // view options
)};
20:11

10/08/2009

Hello Tom!
You current code will be run only one time - at the initialisation time when you call 'navGrid' function. I wrote you before that if you want to have dynamic message (if the text will be different at different calls) like you as want you have to do this in beforeShowForm event handle. You can do like following
jQuery("#list").jqGrid('navGrid','#pager',
{edit:false,view:true}, //options
{}, // edit options
{height:290,reloadAfterSubmit:false,jqModal:false, closeOnEscape:true,bottominfo:"Fields marked with (*) are required", closeAfterAdd: true}, // add options
{reloadAfterSubmit:true,jqModal:true, closeOnEscape:true,caption: "Delete…",width:300
beforeShowForm: function(form) {
$("td.delmsg",form).html("Do you really want delete the row with <b>id=" +
jQuery("#list").jqGrid('getGridParam','selrow') + "</b>?");
}}, // del options
{closeOnEscape:true}, // search options
{height:250,jqModal:false,closeOnEscape:true} // view options
)};
It is an example only what you can do to ovewrite the default text. On the page http://www.ok-soft-gmbh.com/jq.....DelMsg.htm you can how it work live. I changed the width parameter of the delete message box only to make it without scroll bar. You can choose the value of width depend on the size of the text which you will display.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
67 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66