Dear Telerik,
We have a RadTree that when you click any of its nodes, it opens a RadWindow containing a new dynamic page with a RadGrid, and RadToolbar. In the code behind, we're setting the:
radGrid.ClientSettings.ClientEvents.OnGridCreated = "GridCreated";
And in javascript we're setting focus to the grid:
When you click any tree node, it hides any open window, then tries to locate the corresponding window to show:
1) If no window is found then it opens a new window populating it with a grid, and setting focus to the grid's first row correctly, and we can navigate using the keyboard.
2) If a window is found then it only shows that window, but the grid is losing focus, and we can't use keyboard navigation unless we click on the grid to activate it.
Is there any way to set focus to the grid in the second case above?
We tried to call the
Can you please help?
Salah A. Malaeb
TeknoBuild
We have a RadTree that when you click any of its nodes, it opens a RadWindow containing a new dynamic page with a RadGrid, and RadToolbar. In the code behind, we're setting the:
radGrid.ClientSettings.ClientEvents.OnGridCreated = "GridCreated";
And in javascript we're setting focus to the grid:
function GridCreated(sender, args) {
var
currentGrid = $find(sender.ClientID);
var row = currentGrid.get_masterTableView().get_selectedItems()[0];
if (row)
currentGrid.set_activeRow(row.get_element());
currentGrid.Control.focus();
}
When you click any tree node, it hides any open window, then tries to locate the corresponding window to show:
1) If no window is found then it opens a new window populating it with a grid, and setting focus to the grid's first row correctly, and we can navigate using the keyboard.
2) If a window is found then it only shows that window, but the grid is losing focus, and we can't use keyboard navigation unless we click on the grid to activate it.
Is there any way to set focus to the grid in the second case above?
We tried to call the
currentGrid.Control.focus();
but with no luck, we tried also
currentGrid.get_masterTableView().get_dataItems()[0].get_element().cells[0].focus();
and we could not make the grid to receive focus and we can't navigate using the keyboard.Can you please help?
Salah A. Malaeb
TeknoBuild