Custom BusinessDataListWebPart Pagination (Next Button) - pageindex never changes am adding BusinessDataListWebPart using code. Everything works fine. I can see 20 data raw at the same time but when I click &quot;Next Button&quot;, I can not see next 20-40 data.  A postback occurs, but the pageindex never changes. <pre class=prettyprint><code><span class=typ><pre>BusinessDataListWebPart consumer = new BusinessDataListWebPart(); consumer.Title = title; consumer.Application = instance.Name; consumer.Entity = projEntity.Name; consumer.XslLink = &quot;/Style%20Library/XSL%20Style%20Sheets/&quot; + xslFileName; consumer.PageSize = 20;</pre> </span></code></pre>© 2009 Microsoft Corporation. All rights reserved.Fri, 26 Jun 2009 02:44:11 Za0127e24-16e2-4278-9ced-fd6d764f0aechttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/a0127e24-16e2-4278-9ced-fd6d764f0aec#a0127e24-16e2-4278-9ced-fd6d764f0aechttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/a0127e24-16e2-4278-9ced-fd6d764f0aec#a0127e24-16e2-4278-9ced-fd6d764f0aecsHrUDiPhttp://social.msdn.microsoft.com/Profile/en-US/?user=sHrUDiPCustom BusinessDataListWebPart Pagination (Next Button) - pageindex never changes am adding BusinessDataListWebPart using code. Everything works fine. I can see 20 data raw at the same time but when I click &quot;Next Button&quot;, I can not see next 20-40 data.  A postback occurs, but the pageindex never changes. <pre class=prettyprint><code><span class=typ><pre>BusinessDataListWebPart consumer = new BusinessDataListWebPart(); consumer.Title = title; consumer.Application = instance.Name; consumer.Entity = projEntity.Name; consumer.XslLink = &quot;/Style%20Library/XSL%20Style%20Sheets/&quot; + xslFileName; consumer.PageSize = 20;</pre> </span></code></pre>Wed, 24 Jun 2009 15:06:08 Z2009-06-24T17:37:28Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/a0127e24-16e2-4278-9ced-fd6d764f0aec#8b00d485-4552-48d0-a225-cead73257793http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/a0127e24-16e2-4278-9ced-fd6d764f0aec#8b00d485-4552-48d0-a225-cead73257793sHrUDiPhttp://social.msdn.microsoft.com/Profile/en-US/?user=sHrUDiPCustom BusinessDataListWebPart Pagination (Next Button) - pageindex never changes<p>OK..I found the answer.</p> <p>For pagination I needed to add &quot;ParameterBindings&quot; to the business data list webpart. My final code is following and it works perfect. <br/><br/> </p> <pre> BusinessDataListWebPart consumer = new BusinessDataListWebPart(); ServerContext serverContext = ServerContext.GetContext(site); SqlSessionProvider.Instance().SetSharedResourceProviderToUse(serverContext); LobSystemInstance instance = ApplicationRegistry.GetLobSystemInstanceByName(applicationName); Entity projEntity = instance.GetEntities()[entityName]; consumer.Title = title; consumer.Application = instance.Name; consumer.Entity = projEntity.Name; consumer.XslLink = &quot;/Style%20Library/XSL%20Style%20Sheets/&quot; + xslFileName; consumer.PageSize = 20; consumer.ParameterBindings = &quot;&lt;ParameterBinding Name=&quot; + &quot;\&quot;dvt_firstrow\&quot;&quot; + &quot; Location=&quot; + &quot;\&quot;Postback;Connection\&quot;&quot; + &quot;/&gt;&quot; + &quot; &lt;ParameterBinding Name=&quot; + &quot;\&quot;dvt_sortdir\&quot;&quot; + &quot; Location=&quot; + &quot;\&quot;Postback;Connection\&quot;&quot; + &quot;/&gt;&quot; + &quot; &lt;ParameterBinding Name=&quot; + &quot;\&quot;dvt_sortfield\&quot;&quot; + &quot; Location=&quot; + &quot;\&quot;Postback;Connection\&quot;&quot; + &quot;/&gt;&quot; + &quot; &lt;ParameterBinding Name=&quot; + &quot;\&quot;dvt_filterfields\&quot;&quot; + &quot; Location=&quot; + &quot;\&quot;Postback;Connection\&quot;&quot; + &quot;/&gt;&quot; + &quot; &lt;ParameterBinding Name=&quot; + &quot;\&quot;dvt_partguid\&quot;&quot; + &quot; Location=&quot; + &quot;\&quot;Postback;Connection\&quot;&quot; + &quot;/&gt;&quot;;</pre>Wed, 24 Jun 2009 19:42:16 Z2009-06-24T19:42:40Z