Showing posts with label paging. Show all posts
Showing posts with label paging. Show all posts

Wednesday, March 28, 2012

ASP.NET AJAX Enabled website Problem Stack Overflow

Hi all,

I use ASP.NET AJAX Enabled website. It gives error in IE "Stack Overflow at Line : 0" while i am doing paging in datagrid or any action like button click etc.

Anyone please solve my issue.

Thanks & Regards,

Patel Nasrullah


Make sure you do not have smart navigation turnned on.


Check out this post:http://forums.asp.net/p/956056/1397151.aspx

Specifically the post bywinter: "Had this problem also, did a little search and it turns out that it may be a bug in IE6 as well... (search Microsoft KB for more on this)
However, I resolved this when I changed to SmartNavigation="true" in my config-file instead of MaintainScrollPositionOnPostback.
Also a little tip: make sure that this is not still declared in any your pages' Page-property if SmartNavigation is used in the config-file."

-Damien

Monday, March 26, 2012

Asp.Net ajax 1.0 Paging control

Is there any control in ajax tool kit which can be used for paging?

i dont want to post back the page to get the next page of records.

Today a video was published that addresses this very topic. I hope it helps you.

How Do I: Implement the AJAX Paging Pattern?


thanks man..

nice to hear from you...No 1 in the hall of fame listParty!!! CONGRATS

ASP.NET AJAX + JSON: Custom Grid with paging + sorting

Hi,

I am looking for the following solution:

I replaced myUpdatePanel with a client-side PageMethod to a Webservice webmethodusing ASP.NET Ajax and JSON serialization. I now want to use some kindof data table to display my result, however I also need Paging +Sorting.

Using asp:GridView is not a solution here since it is a server-side control with server-side sorting functionality.

Any suggestions? I don't want some heavy JS file that can do this.

You can add two more parameters to your "webmethod" - something like pageNumber and sortString. If I understood you correctly.


Yep. I am just wondering how to construct this whole thing. So far I am thinking of passing the sortDirection, and perform the sorting on the server side directly since I am dealing with a List. The paging is a little trickier though.


hello.

for paging, you just need to pass the current page and the number of elements per page. you should perform paging on the server side and only return the neecessary elements.


Thank youGeeked


What did you end up using for your solution? You mentioned a GridView was not an option... are you constructing the table by hand?

Wednesday, March 21, 2012

argumentNullException with gridview paging with toolkit control in template field

hi

I have a simple page with a gridview. the item template has an AjaxControlToolkit:confirmButtonExtender. All is good until I tried to enable custom paging in the gridview and object data source. the first page loads but when I click on the 2nd page I get an argumentNullException thrown. The Page argument is null. I can make paging work by removing the AjaxControlToolkit:confirmButtonExtender. Anybody got any ideas about this?

Value cannot be null. Parameter name: page

stack trace:

at Microsoft.Web.UI.ScriptManager.GetCurrent(Page page)
at AjaxControlToolkit.ExtenderControlBase.EnsureScripts() in d:\TFS\AtlasControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 129
at AjaxControlToolkit.ExtenderControlBase.GetScriptReferences() in d:\TFS\AtlasControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:line 515
at Microsoft.Web.UI.ExtenderControl.Microsoft.Web.UI.IExtenderControl.GetScriptReferences()
at Microsoft.Web.UI.ScriptControlManager.RegisterScriptsForExtenderControls()
at Microsoft.Web.UI.ScriptControlManager.RegisterScripts()
at Microsoft.Web.UI.ScriptManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Page:

<%@dotnet.itags.org.PageLanguage="C#"MasterPageFile="~/SheetDataEntry.master"AutoEventWireup="true"CodeFile="SheetList.aspx.cs"Inherits="SheetList"Title="Untitled Page" %>
<%@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %>
<%@dotnet.itags.org.RegisterAssembly="Microsoft.Web.Preview"Namespace="Microsoft.Web.Preview.UI"TagPrefix="asp" %>

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataSourceID="ObjectDataSource1"OnRowCommand="GridView1_RowCommand" AllowPaging="true"pagesize="2">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLinkID="HyperLink1"runat="server"NavigateUrl='<%# Eval("Uid", "SheetEdit.aspx?SheetUid={0}") %>'Target="_parent"Text='<%# Eval("SheetId", "Edit {0}") %>'></asp:HyperLink>
<asp:LinkButtonID="LinkButton1"runat="server"CommandArgument='<%# Eval("Uid", "{0}") %>'CommandName="DeleteSheet"OnClick="LinkButton1_Click">Delete

<ajaxToolkit:ConfirmButtonExtenderID="ConfirmButtonExtender1"runat="server"ConfirmText='Are you sure you want to delete?'TargetControlID="LinkButton1"
BehaviorID="ctl02_ConfirmButtonExtender1"Enabled="True"
>
</ajaxToolkit:ConfirmButtonExtender

</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundFieldDataField="SheetId"HeaderText="SheetId"SortExpression="SheetId"/>
</Columns>
</asp:GridView>

<asp:ObjectDataSourceID="ObjectDataSource1"runat="server"OldValuesParameterFormatString="original_{0}"
OnObjectCreating="ObjectDataSource1_ObjectCreating"SelectMethod="SelectAll"TypeName="Bst.Rincon.BL.SheetInformation.SheetListJunction"
EnablePaging="true"SelectCountMethod="SelectCount">
</asp:ObjectDataSource>

</asp:Content>

here's an explanation of the underlying problem:

Known Issue & Workaround: Extenders no longer work in templated controls:http://forums.asp.net/thread/1441672.aspx

for now i can continue without the ConfirmButtonExtender. And I can tell the boss that I didn't break it... Yipee!

Cheers,

Alan Grant