473,408 Members | 2,032 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,408 software developers and data experts.

Problem with "Custom paging" of DataGrid control

I created a page to show RealEstate Data with images
retrived from the MSSQL 2000. I am using a DataGrid
control:

<asp:datagrid
AllowPaging="True"
OnPageIndexChanged="Pageindexchanged"

Sub PageIndexChanged(ByVal sende.........)
myDataGrid.CurrentPageIndex = e.NewPageIndex
myDataGrid.DataBind()
End Sub

It works just fine and I am able to go thru the records.
The problem begins when I trying to implement Custom
paging which is a very important for large number of
records and aspetially in my case with a images,becouse if
you using a Custom paging the page is receiving only
current record baced od page index.
So, when I am chenging my code to:

<asp:datagrid
AllowPaging="True"
AllowCustomPaging="True"
OnPageIndexChanged="Pageindexchanged"


Sub PageIndexChanged(ByVal sende.........)
intStartIndex = (e.NewPageIndex * myDataGrid.PageSize)
myDataGrid.CurrentPageIndex = e.NewPageIndex
BindDataGrid()
End Sub

the event OnPageIndexChanged become not available! I have
no idea what is happened. I got the same sittuation with
Sorting event.
I will be appretiate for any help.
Alex.
Jul 19 '05 #1
1 4385
Figured it out,thanks!
I had an error in Form load event,this is why the next
event was not show up.I just do not understant why I did
not get any error msg.
Alex.
-----Original Message-----
I created a page to show RealEstate Data with images
retrived from the MSSQL 2000. I am using a DataGrid
control:

<asp:datagrid
AllowPaging="True"
OnPageIndexChanged="Pageindexchanged"

Sub PageIndexChanged(ByVal sende.........)
myDataGrid.CurrentPageIndex = e.NewPageIndex
myDataGrid.DataBind()
End Sub

It works just fine and I am able to go thru the records.
The problem begins when I trying to implement Custom
paging which is a very important for large number of
records and aspetially in my case with a images,becouse

ifyou using a Custom paging the page is receiving only
current record baced od page index.
So, when I am chenging my code to:

<asp:datagrid
AllowPaging="True"
AllowCustomPaging="True"
OnPageIndexChanged="Pageindexchanged"


Sub PageIndexChanged(ByVal sende.........)
intStartIndex = (e.NewPageIndex * myDataGrid.PageSize)
myDataGrid.CurrentPageIndex = e.NewPageIndex
BindDataGrid()
End Sub

the event OnPageIndexChanged become not available! I have
no idea what is happened. I got the same sittuation with
Sorting event.
I will be appretiate for any help.
Alex.
.

Jul 19 '05 #2

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

Similar topics

0
by: scamp | last post by:
I am creating a custom datagrid that inherits from the System.Web.UI.WebControls.DataGrid. I'm trying to add a property called ScrollHeight which is of type Unit. Whenever I try to edit the...
1
by: charliewest | last post by:
Is it possible to use the custom validation control to validate a calendar control via client-side script (in jscript)? I'm familiar with custom validation and client side script, and i am aware...
15
by: Tinus | last post by:
Hello all, I've created a custom control that draws a monthly schedule (using the Draw function in C#). Basically it draws 31 boxes and writes the day number in every box. This works...
1
by: Lamont Adams | last post by:
Hi all, I've created numerous custom controls of varying complexity, but I've been on this problem for a day and a half, and I can't figure this mystery out. I hope one of you kind folks can...
0
by: Ravi Ambros Wallau | last post by:
Hi: I've created a custom control - a grid that uses Infragistics to display some filters, the grid itself, and some buttons. Well, when using this control directly on WebForm, everything works...
4
by: Steve | last post by:
I am fairly new to VB.NET, and I am rewriting an application I wrote a while back, also in VB.NET. I aplied some new things I learned. Anyway, here is my problem....... I have a custom DataGrid...
0
by: Pavan | last post by:
My name is Pavan and I am a software engineer working on ASP .Net web development. Currently I am using .Net 2.0 Professional Edition to develop my web pages. I have a problem
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
2
by: ahmed.maryam | last post by:
Hello Everyone, I designed a custom control that is entirely covered by a picture box. I then dragged this custom control onto a windows form application (called main) and I need to handle mouse...
3
by: Tomasz J | last post by:
Hello Developers, I have a control derived from System.Web.UI.WebControls.WebControl. Control has this property: public string Value { set { _value = value; } get { return _value; }
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.