What I have is a radgrid, wonderfully populated with data. On each row of this grid, I have three buttons (inherited from RadButtons). One of these buttons does not need any confirmation. Two of them, however, need confirmation before firing ItemCommand.
Part of the issue is a certain convoluted way the button is implemented, it requires me to use fireCommand from JavaScript. However, I need to obtain the row index to pass as a parameter to the fireCommand function.
How do I obtain the row index of the row containing my button for use in JavaScript?
Part of the issue is a certain convoluted way the button is implemented, it requires me to use fireCommand from JavaScript. However, I need to obtain the row index to pass as a parameter to the fireCommand function.
How do I obtain the row index of the row containing my button for use in JavaScript?
01.
function
OnClientClickingDelete(sender, args) {
02.
var
r = confirm(
'This action will delete the selected employee. Are you sure?'
);
03.
04.
if
(r ==
true
) {
05.
var
masterTable = $find(
'<%= rgEnrolled.ClientID %>'
).get_masterTableView();
06.
masterTable.fireCommand(
'Delete'
, ****RowIndex****);
07.
}
08.
}
09.
10.
function
OnClientClickingRestore(sender, args) {
11.
var
r = confirm(
'This action will restore the selected employee. Are you sure?'
);
12.
13.
if
(r ==
true
) {
14.
var
masterTable = $find(
'<%= rgEnrolled.ClientID %>'
).get_masterTableView();
15.
masterTable.fireCommand(
'Restore'
, ****RowIndex****);
16.
}
17.
}