473,574 Members | 3,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Tr ue"
OnPageIndexChan ged="Pageindexc hanged"

Sub PageIndexChange d(ByVal sende.........)
myDataGrid.Curr entPageIndex = e.NewPageIndex
myDataGrid.Data Bind()
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="Tr ue"
AllowCustomPagi ng="True"
OnPageIndexChan ged="Pageindexc hanged"


Sub PageIndexChange d(ByVal sende.........)
intStartIndex = (e.NewPageIndex * myDataGrid.Page Size)
myDataGrid.Curr entPageIndex = e.NewPageIndex
BindDataGrid()
End Sub

the event OnPageIndexChan ged 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 4413
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:datagri d
AllowPaging="T rue"
OnPageIndexCha nged="Pageindex changed"

Sub PageIndexChange d(ByVal sende.........)
myDataGrid.Curr entPageIndex = e.NewPageIndex
myDataGrid.Data Bind()
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:datagri d
AllowPaging="T rue"
AllowCustomPag ing="True"
OnPageIndexCha nged="Pageindex changed"


Sub PageIndexChange d(ByVal sende.........)
intStartIndex = (e.NewPageIndex * myDataGrid.Page Size)
myDataGrid.Curr entPageIndex = e.NewPageIndex
BindDataGrid()
End Sub

the event OnPageIndexChan ged 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
936
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 property from the Visual Studio designer I get the message "Invalid property value - Not Implemented". Yet when I go to the HTML and enter the...
1
2706
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 that the custom control cannot be wired automatically to the calendar control, but i cannot seem to "read" the value of the calendar control via...
15
10935
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 great. But I now want to show a different tooltip for every day. For now I found out that I can add a tooltip for the entire custom control
1
1963
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 point out the really obvious and stupid thing I'm overlooking here. :) I have a custom control that provides a tasklist similar to what you get in...
0
2126
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 really fine. No problems at all. But, when this control is placed inside a template of an Infragistics UltraWebTab control, somethings stranges...
4
1821
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 with a buttonRow that does a delete function for me. Microsoft support helped me back then to get this done. Here is part of the code that creates...
0
1542
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
6499
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 accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then...
2
3247
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 events in my main application. Specifically, when a user double clicks on my custom control I need to draw something on another picture box...
3
1420
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; }
0
7755
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7852
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8133
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5333
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3770
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3791
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2268
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1366
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.