R
rn5a
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 particular order (like ProductID, Name,
Description, Quantity etc.) are displayed in one DataGrid where as the
personal details of the buyer corresponding to this order (like Name,
E-Mail, Shipping & Billing Address etc.) are displayed in another
DataGrid. Note that both the DataGrids reside in the same ASPX page.
Users can also place multiple orders. Under such circumstances, I want
to provide paging capability to the ASPX page that displays the 2
DataGrids. Assume that I have placed 5 orders & currently I am viewing
my 1st order. The 1st DataGrid displays the order details of my 1st
order & the 2nd DataGrid displays personal details corresponding to my
1st order. When I click the 2nd paging link, the 1st DataGrid should
display the order details of my 2nd order & the 2nd DataGrid should
display the personal details corresponding to my 2nd order.
The problem is if I provide paging in the 1st DataGrid & then click
the 2nd paging link to view my 2nd order & personal details, then the
1st DataGrid will correctly display the order details of my 2nd order
but the 2nd DataGrid will not correctly display the personal details
corresponding to my 2nd order.
The situation just reverses if I provide paging in the 2nd DataGrid
i.e. while viewing the details of my 1st order, if I click the 2nd
paging link to v;iew my 2nd order & personal details, then the 2nd
DataGrid will display the personal details of my 2nd order correctly
but the 1st DataGrid will not correctly display the order details
corresponding to my 2nd order.
What do I do in such a scenario?
Of course, I can do the paging manually but that would involve adding
a lot of extra code. I won't be able to use the in-built paging
feature of the DataGrid as well.
Please note that I would like to display the order details & personal
details in 2 different DataGrids only.
personal details of a user from a MS-Access database table depending
upon the username of the user.
The order details of a particular order (like ProductID, Name,
Description, Quantity etc.) are displayed in one DataGrid where as the
personal details of the buyer corresponding to this order (like Name,
E-Mail, Shipping & Billing Address etc.) are displayed in another
DataGrid. Note that both the DataGrids reside in the same ASPX page.
Users can also place multiple orders. Under such circumstances, I want
to provide paging capability to the ASPX page that displays the 2
DataGrids. Assume that I have placed 5 orders & currently I am viewing
my 1st order. The 1st DataGrid displays the order details of my 1st
order & the 2nd DataGrid displays personal details corresponding to my
1st order. When I click the 2nd paging link, the 1st DataGrid should
display the order details of my 2nd order & the 2nd DataGrid should
display the personal details corresponding to my 2nd order.
The problem is if I provide paging in the 1st DataGrid & then click
the 2nd paging link to view my 2nd order & personal details, then the
1st DataGrid will correctly display the order details of my 2nd order
but the 2nd DataGrid will not correctly display the personal details
corresponding to my 2nd order.
The situation just reverses if I provide paging in the 2nd DataGrid
i.e. while viewing the details of my 1st order, if I click the 2nd
paging link to v;iew my 2nd order & personal details, then the 2nd
DataGrid will display the personal details of my 2nd order correctly
but the 1st DataGrid will not correctly display the order details
corresponding to my 2nd order.
What do I do in such a scenario?
Of course, I can do the paging manually but that would involve adding
a lot of extra code. I won't be able to use the in-built paging
feature of the DataGrid as well.
Please note that I would like to display the order details & personal
details in 2 different DataGrids only.