﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><pubDate>Wed, 30 Mar 2011 20:51:10 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;Hi Lili Khiung,&lt;/p&gt;
&lt;p&gt;     Now it's Ok!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;thanks a lot!&lt;/p&gt;</description></item><item><title>Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><pubDate>Wed, 30 Mar 2011 04:12:39 GMT</pubDate><dc:creator>lili</dc:creator><description>&lt;p&gt;Hi Xu Guochun,&lt;/p&gt;
&lt;p&gt;Please set the property of PagingDataRetrievalMode to ReturnPartialRows in the properties. It should work with your issue. If it won't work, could you give me a simple runable sample so that we could test it here?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Hope it helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Lili Khiung&lt;/p&gt;</description></item><item><title>Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><pubDate>Tue, 29 Mar 2011 20:28:35 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;Hi Lili Khiung,&lt;/p&gt;
&lt;p&gt;     I&lt;span title="点击可显示其他翻译" class="hps" closure_uid_2dy6tv="77"&gt; set the PagingDetectPartialGroupRows property to "true"&amp;nbsp;&lt;/span&gt;&lt;span title="点击可显示其他翻译" class="hps" closure_uid_2dy6tv="77"&gt;&lt;span class="short_text" id="result_box" lang="undefined"&gt;&lt;span title="点击可显示其他翻译" closure_uid_2dy6tv="98"&gt;, but&lt;/span&gt; &lt;span title="点击可显示其他翻译" class="hps" closure_uid_2dy6tv="99"&gt;the problem persists.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" DefaultStyleMode="Win7"&lt;br /&gt;            OnInitializeRow="WebGrid1_InitializeRow" UseDefaultStyle="True" DataSourceID="ISDataSource1"&lt;br /&gt;            DataMember="Messages_Center"&amp;gt;&lt;br /&gt;            &amp;lt;LayoutSettings PagingMode="ClassicPaging" PagingLoadMode="Custom" PagingSize="20" &lt;span style="color: #ff0000"&gt;PagingDetectPartialGroupRows="true"&lt;/span&gt;&amp;gt;&lt;br /&gt;            &amp;lt;/LayoutSettings&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/p&gt;</description></item><item><title>Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><pubDate>Tue, 29 Mar 2011 07:04:40 GMT</pubDate><dc:creator>lili</dc:creator><description>&lt;p&gt;Hi Xu Guochun,&lt;/p&gt;
&lt;p&gt;Have you try to enable the PagingDetectPartialGroupRows property? You can enable it in WebGrid.Designer &amp;gt; Popular Settings &amp;gt; Automatically detect partial grouped rows (for classic paging). Please inform me about the result.&lt;/p&gt;

&lt;p&gt;Hope it helps.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Lili Khiung&lt;/p&gt;</description></item><item><title>Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><pubDate>Mon, 28 Mar 2011 04:48:48 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;pre&gt;The code:&lt;/pre&gt;&lt;pre&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %&amp;gt;

&amp;lt;%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls"
    TagPrefix="ISWebInput" %&amp;gt;
&amp;lt;%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop"
    TagPrefix="ISWebDesktop" %&amp;gt;
&amp;lt;%@ Register Assembly="ISNet.WebUI.ISDataSource, Version=1.0.1500.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b"
    Namespace="ISNet.WebUI.DataSource" TagPrefix="ISDataSource" %&amp;gt;
&amp;lt;%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;
&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head runat="server"&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;table border="0" cellpadding="0" cellspacing="0"&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;nbsp;&amp;nbsp;
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    时间：
                &amp;lt;/td&amp;gt;
                &amp;lt;td align="right" nowrap&amp;gt;
                    &amp;lt;table&amp;gt;
                        &amp;lt;tr&amp;gt;
                            &amp;lt;td&amp;gt;
                                &amp;lt;ISWebInput:WebInput ID="DateFrom1" runat="server"&amp;gt;
                                    &amp;lt;CultureInfo CultureName="zh-CN"&amp;gt;
                                    &amp;lt;/CultureInfo&amp;gt;
                                    &amp;lt;DisplayFormat Format="yyyy/MM/dd" IsEnabled="true"&amp;gt;
                                    &amp;lt;/DisplayFormat&amp;gt;
                                   &amp;lt;DateTimeEditor DateInputLink="ctl00_content_DateTo1" IsEnabled="true"&amp;gt;
                                    &amp;lt;/DateTimeEditor&amp;gt;
                                &amp;lt;/ISWebInput:WebInput&amp;gt;
                            &amp;lt;/td&amp;gt;
                            &amp;lt;td&amp;gt;
                                至
                            &amp;lt;/td&amp;gt;
                            &amp;lt;td&amp;gt;
                                &amp;lt;ISWebInput:WebInput ID="DateTo1" runat="server"&amp;gt;
                                    &amp;lt;CultureInfo CultureName="zh-CN"&amp;gt;
                                    &amp;lt;/CultureInfo&amp;gt;
                                    &amp;lt;DisplayFormat Format="yyyy/MM/dd" IsEnabled="True"&amp;gt;
                                    &amp;lt;/DisplayFormat&amp;gt;
                                    
                                    &amp;lt;DateTimeEditor IsEnabled="true"&amp;gt;
                                    &amp;lt;/DateTimeEditor&amp;gt;
                                &amp;lt;/ISWebInput:WebInput&amp;gt;
                            &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                    &amp;lt;/table&amp;gt;
                &amp;lt;/td&amp;gt;
                &amp;lt;td align="right" nowrap&amp;gt;
                    标题：
                &amp;lt;/td&amp;gt;
                &amp;lt;td align="left" nowrap&amp;gt;
                    &amp;lt;asp:TextBox ID="txtTitle" Width="80px" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                &amp;lt;/td&amp;gt;
                &amp;lt;td align="right" nowrap id="tdArchiveS1" runat="server"&amp;gt;
                    &amp;nbsp;文号：
                &amp;lt;/td&amp;gt;
                &amp;lt;td align="left" nowrap id="tdArchiveS2" runat="server"&amp;gt;
                    &amp;lt;asp:TextBox ID="txtArchiveNo" Width="80px" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;nbsp;
                &amp;lt;/td&amp;gt;
                &amp;lt;td align="left" nowrap&amp;gt;
                    &amp;lt;ISWebDesktop:WebButton ID="btnSearch" runat="server" Text="查  询" PostBackMode="FullPostBack"
                        AutoPostback="true" OnClicked="btnSearch_Clicked" /&amp;gt;
                &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/table&amp;gt;
        &amp;lt;ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" DefaultStyleMode="Win7"
            OnInitializeRow="WebGrid1_InitializeRow" UseDefaultStyle="True" DataSourceID="ISDataSource1"
            DataMember="Messages_Center"&amp;gt;
            &amp;lt;LayoutSettings PagingMode="ClassicPaging" PagingLoadMode="Custom" PagingSize="20"&amp;gt;
            &amp;lt;/LayoutSettings&amp;gt;
            &amp;lt;RootTable&amp;gt;
                &amp;lt;Columns&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Name="RowNumber" Caption="序号" Width="30px"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" Bound="False"
                        ColumnType="CheckBox" EditType="NoEdit" IsRowChecker="True" Name="colChk" ShowInSelectColumns="No"
                        Width="25px"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Name="Title" Caption="主题" DataMember="Title"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Name="BeiZhu" Caption="步骤名称" DataMember="BeiZhu"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Name="TargetDispName" Caption="办理人" DataMember="TargetDispName"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Name="FromDispName" Caption="提交人" DataMember="FromDispName"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Name="GenerateDate" Caption="发送时间" DataMember="GenerateDate"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                &amp;lt;/Columns&amp;gt;
            &amp;lt;/RootTable&amp;gt;
        &amp;lt;/ISWebGrid:WebGrid&amp;gt;
        &amp;lt;ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaType="CustomObject"&amp;gt;
            &amp;lt;Tables&amp;gt;
                &amp;lt;ISDataSource:ISDataSourceTable SelectMethod="WaitHandle_PageView_BanLi" EnablePaging="true"
                    SelectCountMethod="WaitHandle_Count_BanLi" TableName="Messages_Center" TypeName="WebApplication1.App_Code.Messages_Center"&amp;gt;
                    &amp;lt;SelectParameters&amp;gt;
                        &amp;lt;asp:ControlParameter ControlID="DateFrom1" Name="DateFromTo" PropertyName="Value"
                            Type="String" /&amp;gt;
                        &amp;lt;asp:ControlParameter ControlID="DateTo1" Name="DateTo" PropertyName="Value" Type="String" /&amp;gt;
                        &amp;lt;asp:ControlParameter ControlID="txtTitle" Name="txtTitle" PropertyName="Text" Type="String" /&amp;gt;
                        &amp;lt;asp:ControlParameter ControlID="txtArchiveNo" Name="ArchiveNo" PropertyName="Text"
                            Type="String" /&amp;gt;
                    &amp;lt;/SelectParameters&amp;gt;
                &amp;lt;/ISDataSource:ISDataSourceTable&amp;gt;
            &amp;lt;/Tables&amp;gt;
        &amp;lt;/ISDataSource:ISDataSource&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;pre&gt;using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using Microsoft.Practices.EnterpriseLibrary.Data;
namespace WebApplication1.App_Code
{
    [System.ComponentModel.DataObject]
    public class Messages_Center
    {
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public DataView WaitHandle_PageView_BanLi(string DateFromTo, string DateTo, string txtTitle, string ArchiveNo, string sortExpression, int maximumRows, int startRowIndex)
        {
            string sql = " where  SendMode=4 and IsShow = 1 and IsDel= 0 and IsNoHandle=0 and DoneDate is null ";
            if (DateFromTo != null &amp;amp;&amp;amp; DateFromTo != "")
            {
                if (IsOracle())
                    sql &amp;#43;= " and GenerateDate &amp;gt;= TO_DATE('" &amp;#43; DateFromTo &amp;#43; "','YYYY-MM-DD HH24:MI:SS') ";
                else
                    sql &amp;#43;= " and GenerateDate &amp;gt;= '" &amp;#43; DateFromTo &amp;#43; "' ";
            }
            if (DateTo != null &amp;amp;&amp;amp; DateTo != "")
            {
                if (IsOracle())
                    sql &amp;#43;= " and GenerateDate &amp;lt;= TO_DATE('" &amp;#43; DateTo &amp;#43; " 23:59:59','YYYY-MM-DD HH24:MI:SS') ";
                else
                    sql &amp;#43;= " and GenerateDate &amp;lt;= '" &amp;#43; DateTo &amp;#43; " 23:59:59' ";
            }
            if (txtTitle != null &amp;amp;&amp;amp; txtTitle != "")
                sql &amp;#43;= "and Title like '%" &amp;#43; txtTitle &amp;#43; "%'";

            if (ArchiveNo != null &amp;amp;&amp;amp; ArchiveNo != "")
                sql &amp;#43;= "and ArchiveNo like '%" &amp;#43; ArchiveNo &amp;#43; "%'";
            sql &amp;#43;= "and  MessageType = '办理' ";



            string OrderBy = " order by GenerateDate desc  ";
            int TotalNum = 0;
            DBOperate DBOper = new DBOperate("Northwind_ConnectionString");
            DataView dv = DBOper.GetData_Page(
                " * ",
                 20,
                 (startRowIndex / 20) &amp;#43; 1,
                "Messages_Center",
                "Row_ID",
                sql,
               OrderBy,
                out TotalNum
                ).DefaultView;

            return dv;
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public int WaitHandle_Count_BanLi(string DateFromTo, string DateTo, string txtTitle, string ArchiveNo, string sortExpression)
        {
            string sql = " where  SendMode=4 and IsShow = 1 and IsDel= 0 and IsNoHandle=0 and DoneDate is null ";
            if (DateFromTo != null &amp;amp;&amp;amp; DateFromTo != "")
            {
                if (IsOracle())
                    sql &amp;#43;= " and GenerateDate &amp;gt;= TO_DATE('" &amp;#43; DateFromTo &amp;#43; "','YYYY-MM-DD HH24:MI:SS') ";
                else
                    sql &amp;#43;= " and GenerateDate &amp;gt;= '" &amp;#43; DateFromTo &amp;#43; "' ";
            }
            if (DateTo != null &amp;amp;&amp;amp; DateTo != "")
            {
                if (IsOracle())
                    sql &amp;#43;= " and GenerateDate &amp;lt;= TO_DATE('" &amp;#43; DateTo &amp;#43; " 23:59:59','YYYY-MM-DD HH24:MI:SS') ";
                else
                    sql &amp;#43;= " and GenerateDate &amp;lt;= '" &amp;#43; DateTo &amp;#43; " 23:59:59' ";
            }
            if (txtTitle != null &amp;amp;&amp;amp; txtTitle != "")
                sql &amp;#43;= "and Title like '%" &amp;#43; txtTitle &amp;#43; "%'";

            if (ArchiveNo != null &amp;amp;&amp;amp; ArchiveNo != "")
                sql &amp;#43;= "and ArchiveNo like '%" &amp;#43; ArchiveNo &amp;#43; "%'";
            sql &amp;#43;= "and  MessageType = '办理' ";

            sql = "Select Count(1) From Messages_Center " &amp;#43; sql;

            DBOperate DBOper = new DBOperate("Northwind_ConnectionString");
            return DBOper.ExecuteSQL_ToInt(sql);
        }


        /// &amp;lt;summary&amp;gt;
        /// 判断当前是否使用的是ORACLE，如果是返回True，否则返回False。如果是Flase，则说明使SQL
        /// 默认：使用模块框架名称
        /// 作者：徐国春
        /// 时间：2010-4-8
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;
        private Boolean IsOracle()
        {
            Database db = DatabaseFactory.CreateDatabase("Northwind_ConnectionString");

            if (db.DbProviderFactory.ToString() == "System.Data.OracleClient.OracleClientFactory")
                return true;
            else
                return false;
        }
    }
}&lt;/pre&gt;
</description></item><item><title>Question of WebGrid Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Question-of-WebGrid-Paging/</link><pubDate>Mon, 28 Mar 2011 04:41:42 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;         I use webgrid binding to ISDataSource, There are 42 rows,3 pages. The data of first page is display correctly. When I click "next page" button to goto page 2  ,the grid data is not change. When I click "next page" again, the grid data display correctly. When I click "prev page" button to goto page 2,the data is not change too! What's wrong?&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You can see the sample by the following url:&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://demo.epoint.com.cn:8080/Website2/Default2.aspx" target="_blank"&gt;http://demo.epoint.com.cn:8080/Website2/Default2.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please help me !&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item></channel></rss>