473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

DataPager Strange Behavior

Hello,

I am using the new ASP.NET 3.5 ListView and DataPager.

Everything is working fine but I am getting a strange behavior in the
DataPager.

When I click a pager button for the first time nothing happens.

When I click the second time it starts to work.

For this moment on every time I click a pager button the action taken
is the correspondent to my previous click.

What is going on?

My ListView uses a Linq as DataSource:

Private Sub lvTags_Init(ByVal sender As Object, ByVal e As
EventArgs) Handles lvTags.Init
With lvTags
.DataKeyNames = New String() {"TagId"}
.DataSource = ldsTags
.ID = "lvTags"
.ItemTemplate = New
ListTemplate(ListTemplate.TemplateType.ItemTemplat e)
.LayoutTemplate = New
ListTemplate(ListTemplate.TemplateType.LayoutTempl ate)
End With
End Sub

Private Sub lvTags_Load(ByVal sender As Object, ByVal e As
EventArgs) Handles lvTags.Load
lvTags.DataBind()
End Sub

Private Sub ldsTags_Init(ByVal sender As Object, ByVal e As
EventArgs) Handles ldsTags.Init
ldsTags.ID = "ldsTags"
End Sub

Private Sub ldsTags_Selecting(ByVal sender As Object, ByVal e As
LinqDataSourceSelectEventArgs) Handles ldsTags.Selecting
Dim cms As New CMSDataContext
Dim tags = From t In cms.Tags _
Select t.TagID, _
t.Text
e.Result = tags
End Sub
The DataPager is created in the LayoutTemplate of my ListView
implemented by the class ListTemplate that I created:

Private Sub dpTags_Init(ByVal sender As Object, ByVal e As
EventArgs)

Dim dpTags As DataPager = CType(sender, DataPager)
Dim npfPages As New NumericPagerField
With npfPages
.ButtonCount = 5
.ButtonType = ButtonType.Link
........................................
End With

With dpTags
.ID = "dpTags"
.PageSize = 8
.Add(npfPages)
End With

End Sub

What am I doing wrong?

Thanks,

Miguel
Nov 22 '07 #1
0 1046

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alexander Inochkin | last post by:
Hi! I found same strange behavior of ASP.NET. It is possible this is the bug. Follow the steps:
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
0
by: shapper | last post by:
Hello, I have been using the new ASP.NET 3.5 DataPager control. It is great. However I found a bug. Check how the PreviousPage / FirstPage and NextPage / LastPage are rendered, and disabled,...
5
by: Mark Olbert | last post by:
How do I get the DataPager and ListView to play nice together when I use a custom datasource? In my webpage, I use linq to pull data from a SqlServer database and assign the resulting...
1
by: =?Utf-8?B?TmVkaW0=?= | last post by:
Is it possible to use DataPager with custom loading classes (I use my own queries because of filtering and paging) and ListView control? ListView control is bound to a DataReader and DataReader...
1
by: shapper | last post by:
Hello, I am using a DataPager with a ListView. I am creating everything at runtime. I need to create a custom DataPager so that the numbers and the next previous symbols will be inside a list...
1
by: bharathreddy | last post by:
Hi, I am using listview control for display. And I am using LINQ for binding the datasource to the listview control at the codebehind. I have implemented the paging in the listview control using...
2
by: sundaramails | last post by:
I am using DataPager in ListView. I put ListView In Infragistics Asynchronous Refresh Panel & Datapager in Update Panel. I have a button in Listview control(Run by client Script). When i click...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.