Paging CasesGrid (My Cases view)

Aug 11, 2009 at 11:18 PM

Hi guys,

 

I have intalled the eService Portal acelerator on my Microsoft Dynamics CRM 4.0 with RollUp5 on Windows Server 2008 and SQL Server 2005.

In the past hours, I've been trying to apply paging to the GridView where the Cases are listed (My Cases).

Unfourtunally I haven't succeded. I tried to apply paging using using the pageindexchanging code, but it doesn't works. I noted that there are two classes, EntityGrid.ascx.cs and CasesGrid.ascx.cs, I understand that CasesGrid insets a EntityGrid control type and also I realized in that the retrievemultiple is executed on the EntityGrid (CasesGrid is the one that finally shows the information). My real problem is that I don't know where to start to modify this GridView :S (making in count that I've tried the obvious)

 

Does anybody has tried this before? Any eService Portal guru there?

 

 

Thanks!

Aug 13, 2009 at 1:38 PM
Edited Aug 13, 2009 at 1:39 PM

Hi

I have added the following to the EntityGrid.ascx.cs and also added the event to PageIndexChanging on EntityGrid.ascx....hope it helps

 

 

protected void gridView_PageIndexChanging(object sender, GridViewPageEventArgs e)

{

gridView.PageIndex = e.NewPageIndex;

gridView.DataBind();

}

 

Aug 13, 2009 at 1:54 PM

Hi BEsterhuzen,

I added this code in the EntityGrid.ascx.cs

    
protected void gridView_PageIndexChanging(object sender, System.Web.UI.WebControls.GridViewPageEventArgs e)
    {
        gridView.PageIndex = e.NewPageIndex;
        gridView.DataBind();

    }

Also, I added this code on the EntityGrid.ascx

<asp:GridView ID="gridView" runat="server"  
                PageSize="50" 
                EnableSortingAndPagingCallbacks="True" 
                PagerStyle-HorizontalAlign="Center" 
                AllowPaging="True"   
                UseAccessibleHeader="False" 
                AutoGenerateColumns="False" OnPageIndexChanging="gridView_PageIndexChanging">
<PagerStyle HorizontalAlign="Center"></PagerStyle>
</asp:GridView>

I can see the page numbers or the "<<>>" arrows to move next or last, but when I do clic any of them nothing happends. I really don't know what to do... am I missing something?

Thanks!

Aug 13, 2009 at 6:56 PM

I noted that events are not being handled :S

Does anybody has had this problem before?

Aug 25, 2009 at 1:14 PM

You want to look at your Controls\EntityGrid.ascx and make sure that the event is begin handled. Select the asp:Gridview#gridView and view properties. Once you see all the properties you can click on the event button

and double click in the gridView_PageIndexChanging to create the event handeler.....and past the following code in it...

protected void gridView_PageIndexChanging(object sender, GridViewPageEventArgs e)<font size="2">

{

gridView.PageIndex = e.NewPageIndex;

gridView.DataBind();

}

Hope this helps.

</font>