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;
}