Hi all
I want users to be able to use hot keys to add/update/delete rows to the radgrid. If they are adding a new row as soon as they enter the data and they press ctrl+shift+I they should be able to save the current row and a new row should be inserted where they can continue entering data for the new row. I use fireCommand to perform the insert which works fine but then if i use another firecommand statement to insert an empty row the update fails. What is interesting is that if i place an alert() statement between the 2 fireCommand calls it works in that case. See the javascript function below that i'm using
Also after any insert/upadate/delete the focus is lost from the grid. How can i set focus back to the radgrid so that the user can continue using arrow keys in the grid. Any assistance will be greatly appreciated!
thanks
mtoori
I want users to be able to use hot keys to add/update/delete rows to the radgrid. If they are adding a new row as soon as they enter the data and they press ctrl+shift+I they should be able to save the current row and a new row should be inserted where they can continue entering data for the new row. I use fireCommand to perform the insert which works fine but then if i use another firecommand statement to insert an empty row the update fails. What is interesting is that if i place an alert() statement between the 2 fireCommand calls it works in that case. See the javascript function below that i'm using
<
script type="text/javascript">
function
KeyPress(sender, eventArgs)
{
var grid;
var table;
grid = sender;
table = grid.get_masterTableView();
//CTRL+Shift+I
if (eventArgs._keyCode == 73 && eventArgs._isCtrlPressed && eventArgs._isShiftPressed)
{
eventArgs.set_cancel(
true);
if (table.get_isItemInserted())
{
table.fireCommand(
"PerformInsert", "");
//alert("now insert another empty row");
table.fireCommand("PerformInsert", "");
}
}
</
script>
Also after any insert/upadate/delete the focus is lost from the grid. How can i set focus back to the radgrid so that the user can continue using arrow keys in the grid. Any assistance will be greatly appreciated!
thanks
mtoori