Link to home
Start Free TrialLog in
Avatar of dcass
dcassFlag for United States of America

asked on

data grid paging - can u set it to a page?

I am using data grid paging on a C# listing program:
"<td borderColor="black"><asp:datagrid id="dg" runat="server" OnPageIndexChanged="dg_PageIndexChanged" AllowPaging="True" PageSize="15" OnItemDataBound="OnItemDataBoundEventHandler" OnItemCreated="OnItemCreatedEventHandler" AutoGenerateColumns="True">
and found that I have to figure out which page I'm on to get the actual line number:
                        int iCtr = e.Item.Controls.Count;
                        int y = dg.Items.Count+(dg.CurrentPageIndex*15);
                        string sID = recordDtl.Rows[y][iCtr].ToString();
Each line in the list (data grid) has a URL attached and when they select it and then later return - it always returns to page 1 no matter what page they were on when they selected from the data grid.
How can you set the page on the data grid to be selected?
Thanks -

ASKER CERTIFIED SOLUTION
Avatar of tovvenki
tovvenki

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial