asp.net c# obout Details Grid get current page Index

am using obout Grid and am creating Details Grid i want to find out the current Page Index of Details Grid(child Grid) my Grid are below

<obout:DetailGrid runat="server" ID="GrdCategoryDetails" ForeignKeys="VENDOR_TYPE_LOOKUP_CODE,VENDOR_ID,ORG_ID"
    AllowSorting="false" DataSourceID="vendor_Details" PageSize="10" AllowPaging="true"
    Width="98%" AllowAddingRecords="false" AllowPageSizeSelection="true" AutoGenerateColumns="false"
    ShowCollapsedGroups="false" ShowFooter="true" AllowDataAccessOnServer="true">
    <ScrollingSettings ScrollHeight="250" />
    <Columns>
        <obout:Column DataField="ORG_ID" Visible="false" HeaderText="Org ID" ReadOnly="true"
            Width="0%">
        </obout:Column>
        <obout:Column DataField="VENDOR_ID" Visible="false" HeaderText="Vendor ID" ReadOnly="true"
            Width="0%">
        </obout:Column>
        <obout:Column DataField="VENDOR_TYPE_LOOKUP_CODE" Visible="true" HeaderText="Broker Type"
            ReadOnly="true" Width="33%">
        </obout:Column>
        <obout:Column DataField="OUTSTANDING_AMT" Visible="true" HeaderText="Outstanding Amt"
            HeaderAlign="right" Align="right" ReadOnly="true" Width="33%">
        </obout:Column>
        <obout:Column DataField="OUTSTANDING_REQ_AMT" Visible="true" HeaderText="Outstanding Req Amt"
            HeaderAlign="right" Align="right" Width="33%">
        </obout:Column>
        <%--<obout:Column ID="Column1" AllowEdit="true" HeaderText="Edit" Width="100" runat="server">
        </obout:Column>--%>
    </Columns>
    <DetailGrids>
        <obout:DetailGrid runat="server" ID="GrdvendorDetailsGrid" ForeignKeys="VENDOR_TYPE_LOOKUP_CODE,VENDOR_ID,ORG_ID"
            AutoGenerateColumns="false" AllowSorting="false" DataSourceID="Vendor_Details1" CurrentPageIndex="0"
            OnUpdateCommand="GrdCategoryDetails_UpdateCommand" PageSize="10" AllowPaging="true"
            Width="98%" AllowAddingRecords="false">
            <ClientSideEvents OnClientSelect="Select_Vendor" OnBeforeClientUpdate="validateUpdateAmount"
                OnClientUpdate="onCommand" ExposeSender="true" />
            <Columns>
                <obout:Column DataField="ORG_ID" Visible="false" HeaderText="Org ID" ReadOnly="true"
                    Width="0%">
                </obout:Column>
                <obout:Column DataField="VENDOR_ID" Visible="false" HeaderText="Vendor ID" ReadOnly="true"
                    Width="0%">
                </obout:Column>
                <obout:Column DataField="VENDOR_NAME" Visible="true" HeaderText="Vendor Name" ReadOnly="true"
                    Width="33%">
                </obout:Column>
                <obout:Column DataField="OUTSTANDING_AMT" Visible="true" HeaderText="Outstanding Amt"
                    HeaderAlign="right" Align="right" ReadOnly="true" Width="33%">
                </obout:Column>
                <obout:Column DataField="OUTSTANDING_REQ_AMT" Visible="true" HeaderText="Outstanding Req Amt"
                    HeaderAlign="right" Align="right" Width="33%">
                    <TemplateSettings EditTemplateId="tmpOtAmount" />
                </obout:Column>
                <obout:Column ID="Column1" AllowEdit="true" HeaderText="Edit" Width="100" runat="server">
                </obout:Column>
            </Columns>
            <Templates>
                <obout:GridTemplate runat="server" ID="tmpOtAmount" ControlID="txtOUTSTANDING_REQ_AMT"
                    ControlPropertyName="value">
                    <Template>
                        <obout:OboutTextBox ID="txtOUTSTANDING_REQ_AMT" runat="server" class="ob_gEC" Text="<%# Container.Value %>" />
                        <%--        <input type="text" id="txtOUTSTANDING_REQ_AMT" class="ob_gEC" value="<%# Container.Value %>" />--%>
                    </Template>
                </obout:GridTemplate>
            </Templates>
        </obout:DetailGrid>
    </DetailGrids>
</obout:DetailGrid>

and here is my code for find the current page index of Details Grid

Session["CurrentPageIndex"] = GrdvendorDetailsGrid.CurrentPageIndex.ToString();

You can use PageIndexChanging event of the grid to capture page index and store in session.

protected void GridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    int PageIndex = e.NewPageIndex;   
}

ASP.NET Grid - Find Selected Records - Server-Side, ASP.NET Grid - Find Selected Records - Server-Side. Order ID. obout inc - ASP.NET Grid - Built in AJAX, ASP.NET AJAX compatible, Incredibly fast, Sorting, paging, add edit delete records, record selection, filtering, templates, scrolling, grouping, exporting, key navigation, resizable columns, cross browser, easy to customize - Master / Detail - Manipulating the Detail Grids on the Client-Side

For getting current page index you can try this

        if(HttpContext.Current.Request["myGVPageId"] != null])
        {
            myGridview.PageIndex =  Convert.ToInt32(HttpContext.Current.Request["myGVPageId"]);
        }

more help on Maintaining GridView current page index after navigating away from Gridview page

ASP.NET Grid - Grid Class Documentation, NET AJAX compatible, Incredibly fast, Sorting, paging, add edit delete CurrentPageIndex, Int. The zero starting index of page that is displayed in the grid. I had to tinker with it a bit to get it to work. This resulted in some working code. Instead of explaining it all in text, I tidied up the code, and made it into a small demo.

If you're doing the paging on front-end, just do it this way

<asp:TemplateField HeaderText="#">
    <ItemTemplate>
        <%# (Container.DataItemIndex + 1) + (gvReport.PageSize * gvReport.PageIndex) %>
    </ItemTemplate>
</asp:TemplateField>

Load the PageSize and PageIndex of your GridView

ASP.NET Grid - Home, NET AJAX compatible, Incredibly fast, Sorting, paging, add edit delete records, record selection, filtering, templates, ASP.NET Grid. Search grid. Search. Drag a column header here to group by that column. Records: 1 - 10 of 25 - Pages: Export Selected Records. Print Master/Detail Get Column Index in template  ASP.NET Grid - Templates Tutorial Templates are used to extend the built-in appearence and functionality of the columns. A column can use templates for view mode and also for edit mode.

ASP.NET Grid - Best Performance using the , SortExpression - gets a value indicating the current sort expression. StartRowIndex - gets a value indicating the index of the row from the data  obout inc - ASP.NET Grid - Built in AJAX, ASP.NET AJAX compatible, Incredibly fast, Sorting, paging, add edit delete records, record selection, filtering, templates

ASP.NET Grid - Maximum Performance Tutorial, startRowIndex - the index of first row on this page. These parameters use to build the SQL query to retrieve only the required rows. GetOrdersCount() Method. obout inc - ASP.NET Grid - Built in AJAX, ASP.NET AJAX compatible, Incredibly fast, Sorting, paging, add edit delete records, record selection, filtering, templates

ASP.NET Grid - Knowledge Base, Deselect the selected records from all the pages on the client side · Hide selected Access column index in header template · Reuse edit Templates - Get client ID of controls placed inside edit templates · Handle server  obout inc - ASP.NET Grid - Built in AJAX, ASP.NET AJAX compatible, Incredibly fast, Sorting, paging, add edit delete records, record selection, filtering, templates

Comments
  • what exactly is the issue here, please can you explain bit more.
  • issue is that we have a nested Grid(child Grid) if am click on the Page number 2 of child Grid then we want put the Page number in session.
  • and what the error exactly you are getting....
  • is there any class with the name 'GrdvendorDetailsGrid' in your code?
  • GrdvendorDetailsGrid is the ID of Details Grid if you see my Grid Code then you will get it and there is no error but we are getting page index number is 0
  • can you tell me that what is Grid_Change Please?
  • there will be an event for the Grid which calls on any changes on the grid like when we change the page
  • so where we can mention it i mean on which event?
  • can you confirm one thing for your code, have you tried by clicking again on any other page and check that it is giving 0 value always. As CurrentPageIndex is a zero-value based property, so may be possibilities that it is picking 0 value for the first time.
  • i think this grid is different from other web grids and they have only limited events for the grid. There are no events for any changes on the grid.