hi,
here a little bit code to understand my problem:
this javascript is defined in a normal aspx page(main.aspx) and will be called by a radWindow, that is opened on the main.aspx. the grid is the on the main.aspx
here the ajaxmanager
this function is called by the javascript ($find("<%= RadAjaxManagerFolder.ClientID %>").ajaxRequest("Next");)
when i call the javascript function on the radWindow and it is the last entry in the grid selected so that it will paging, the grid don't page but the index will be set(first index selected). but when i debug this all (javascript with firebug and codebehind with VS 2008) all works fine!! and because of this, i think it's a timing problem but i don't why.
can anybody help me?? sorry for my bad english ;)...
here a little bit code to understand my problem:
function NextItem() { |
var grid = $find("<%=Grid.ClientID %>"); |
var masterTable = $find("<%= Grid.MasterTableView.ClientID %>"); |
var indexSel = grid._selectedIndexes[0]; |
var nextIndex = indexSel - 0 + 1; |
if (masterTable.CurrentPageIndex == masterTable.PageCount - 1) { |
if (indexSel == masterTable._getLastDataRow().sectionRowIndex) { |
return; |
} |
} |
if (nextIndex == masterTable.PageSize) { |
masterTable.page("Next"); |
$find("<%= RadAjaxManagerFolder.ClientID %>").ajaxRequest("Next"); |
return; |
} |
masterTable.clearSelectedItems(); |
masterTable.selectItem(nextIndex); |
} |
<telerik:RadAjaxManager ID="RadAjaxManagerFolder" runat="server" OnAjaxRequest="RadAjaxManagerFolder_AjaxRequest"> |
</telerik:RadAjaxManager> |
protected void RadAjaxManagerFolder_AjaxRequest(object sender, AjaxRequestEventArgs e) |
{ |
switch (e.Argument) |
{ |
case "Next": |
EmailFolderGrid.Items[0].Selected = true; |
break; |
case "Prev": |
EmailFolderGrid.Items[EmailFolderGrid.Items.Count - 1].Selected = true; |
break; |
default: |
break; |
} |
} |
when i call the javascript function on the radWindow and it is the last entry in the grid selected so that it will paging, the grid don't page but the index will be set(first index selected). but when i debug this all (javascript with firebug and codebehind with VS 2008) all works fine!! and because of this, i think it's a timing problem but i don't why.
can anybody help me?? sorry for my bad english ;)...