formview paging dependent on gridview using pageddatasource
<p>I am displaying a formview on click of a row in a gridview. I have used pageddatasource for formview paging but i don't know what to set for the currentpageindex of the formview. </p>

<pre><code> protected void FormView(string id)
{
    try
    {
        GroupMasterClass gm = new GroupMasterClass();
        gm.igroup_id = Convert.ToInt32(id);
        ResultClass objres = gm.fn_GetGroupMasterFormView();
        ResultClass objres1 = gm.fn_GetGroupList();
        eslist&lt;GroupMasterClass&gt; OBJLISTS = objres1.objData as eslist&lt;GroupMasterClass&gt;;
        eslist&lt;GroupMasterClass&gt; OBJLIST = objres.objData as eslist&lt;GroupMasterClass&gt;;
        if (OBJLIST.Count &gt; 0)
        {
            if (OBJLISTS.Count &gt; 0)
            {
                DataTable dt = (DataTable)OBJLIST;
                pdsfrm.DataSource = dt.DefaultView;
                pdsfrm.AllowPaging = true;
                //pds.PageSize = Convert.ToInt16(ddlPerPage.SelectedValue);
                pdsfrm.PageSize = 1;
                pdsfrm.CurrentPageIndex = frmCurrentPage;
                lnkbtnfrmNext.Enabled = !pdsfrm.IsLastPage;
                lnkbtnfrmPrevious.Enabled = !pdsfrm.IsFirstPage;
                dvGroupMaster.DataSource = pdsfrm;
                dvGroupMaster.DataBind();
                dofrmPaging();
                //dvGroupMaster.DataSource = OBJLIST;
               //dvGroupMaster.DataBind();
                frmvwGroup.Visible = true;
                gridmain.Visible = false;
                lblfrmvrecords.Text = OBJLISTS.Count.ToString();
            }
        }
    }
    catch
    {

    }
}
</code></pre>

<p>Thanks,</p>
