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

Paging in datagrid not working

I know this is a lot of code, but here is what I have;

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
uf_get_supplier_list()
End If
End Sub

Private Sub uf_get_supplier_list()
'This function gets the Withdrawal listing if available.
'Define the local variables.
Dim li_no_row As Integer = 0

Try
'Instantiate an RPC to get an Withdrawal Listing.
lo_AZRM001A_SEL = New MotorFuel.AZRM001A_SEL()
lo_misc_func = New MotorFuel.misc_func()
Catch
'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End Try

'Check for CICS call.
If lo_AZRM001A_SEL.uf_cicscall() Then
'If CICS call is true then move forward.
'Check for the dci error code.
If lo_AZRM001A_SEL.get_dci_error_code = "0000" Then
'Convert the string value to the interget value.
If lo_misc_func.IsNumeric(lo_AZRM001A_SEL.get_dci_row _count) = True Then
li_no_row = Integer.Parse(lo_AZRM001A_SEL.get_dci_row_count)
Else
li_no_row = 0
End If

'Set the data to the Data Grid if the li_no_row is not equal "0".
If li_no_row <> 0 Then
If Page.IsPostBack = False Then
'dtg_sel_sup.DataSource = lo_AZRM001A_SEL.get_ddl_sel_sup
dt_mc = lo_AZRM001A_SEL.get_ddl_sel_sup
dtg_load_data()
End If
Else
End If

'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End If
Else
'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing

End If

End Sub
Private Sub btn_sel_sup_ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_sel_sup_ok.Click
Response.Redirect("../Common/mc_rpt_period.aspx")
End Sub

Sub dtg_load_data()
dtg_sel_sup.DataSource = dt_mc
dtg_sel_sup.DataKeyField = "BusinessID"
dtg_sel_sup.DataMember = "BusinessName"
dtg_sel_sup.DataMember = "Account"
dtg_sel_sup.DataBind()

'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End Sub

Sub dtg_sel_sup_Page(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs)

dtg_sel_sup.CurrentPageIndex = e.NewPageIndex

End Sub

I'm not sure if it is the lack of a Not page.isPostBack that is causing me the problem in my dataload sub or not...any suggestions? Thanks very much for your help :-)
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 20 '05 #1
0 707

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

Similar topics

0
by: Stephen | last post by:
This is a real brain-teaser and i'd really appreciate it if someone can try and understand what im trying to do and give me a few pointers or ideas to help me work out my problem. Im basically...
2
by: Hajime Kusakabe | last post by:
Hi. I have created a datagrid (datagrid1) without any columns on a aspx page. Then aspx.vb adds columns from a database. It is somthing like this .... ================================== Dim...
1
by: Maziar Aflatoun | last post by:
Hi, I have a Datagrid with AllowPaing property set so that the two arrows for the next and previous set of rows are showing. This is working fine. Now is there a way to instead of the 2...
3
by: Andrew Banks | last post by:
I've added a data grid to my page but the automatic paging feature doesn't seem to be working. The code I have on page load is as follows. Can anyone suggest why this isn't working? ...
5
by: Patrick.O.Ige | last post by:
Hi Guys, I have a datagrid wit editing and updating. But after adding Paging IT WON'T PAGE!! It compiles well but when i click on the paging link it doesn't go to the next link.. When i remove...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
2
by: asad | last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom paging bcoz data is too heavy so pls tell me how can i use custom paging in ASP.NET Thanks
0
by: ashish.dwivedi1 | last post by:
Hi, I am building a ASP .NET composite control containing a datagrid during which I am finding a problem while paging of the grid. The problem is for example if I am having three pages to be...
2
by: getziiiiiiiiiii | last post by:
Hi There. . I need some help in paging (which is not working) in ASP:DATAGRID My Data source id is a function which returns DataTable to this datagrid. Do i need a code behind to get the next...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
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
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,...

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.