You must Sign In to post a response.
  • Category: .NET

    New Paging Problem again

    The forum thread has not been reviewed by Editors yet. Readers are advised to use their best judgement before accessing this thread.
    This thread will be reviewed shortly.
    If you think this thread contain inappropriate content, please report to webmaster.
    I following the answers from below
    http://www.dotnetspider.com/qa/Question41951.aspx

    ...but it still not workable, since no the sever control didn't get into the method. I added the method as follow: (tried name the method as _PageIndexChanged or _PageIndexChanging)

    private void waitingForApprovalJob_PageIndexChanged(object sender, DataGridPageChangedEventArgs e)
    {
    waitingForApprovalJob. CurrentPageIndex = e.NewPageIndex;
    Label1.Text = "Into the function";

    waitingForApprovalJob.DataSource = dtWaitingJob;
    waitingForApprovalJob.DataBind();
    }


    What's the exact method name should be?
  • #57361
    Add DataGrid1_CurrentPageIndexchanged() event
    ----------------------------------------------

    DataGrid1.currentPageindex=e.NewPageIndex
    DataGrid1.DataSource=readerObj
    DataGrid1.DataBind()

    InThis way u have to Bind Data to Grid again

  • #57365
    Hi, I added a label, if the server control enter this function, the label will show "In the function" but it didn't show. So what's happening ?

    private void waitingForApprovalJob_PageIndexChanged(object sender, DataGridPageChangedEventArgs e)
    {
    waitingForApprovalJob.CurrentPageIndex = e.NewPageIndex;
    Label1.Text = "Into the function";

    waitingForApprovalJob.DataSource = dtWaitingJob;
    waitingForApprovalJob.DataBind();
    }

  • #57372
    hi..........

    First check the control is going there in page changing_idex or not
    if not means create Page_index chaged event in event property window......
    in tha event u try to bind the datagrid once again......

    nway all the best.......
    Regards....
    Seetaram.C

  • #57375
    Hi I checked the SelectedIndexChanged event, it is work, the Label1 can show "Into the Index Changed function". So what's happen to this PageIndexChangedevent?

    About you mentioned the control is going there in page changing_idex.... what can I do?

    Cheers


    private void waitingForApprovalJob_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    Session["selectedJobCode"] = waitingForApprovalJob.SelectedItem.Cells[1].Text;

    Label1.Text = "Into the Index Changed function";

    ToggleBitmap(waitingForApprovalJob.SelectedItem);
    buttonPanel.Visible = true;
    applicantListPanel.Visible = true;
    }

  • #57376
    Hi I checked the SelectedIndexChanged event, it is work, the Label1 can show "Into the Index Changed function". So what's happen to this PageIndexChangedevent?

    About you mentioned the control is going there in page changing_idex.... what can I do?

    Cheers


    private void waitingForApprovalJob_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    Session["selectedJobCode"] = waitingForApprovalJob.SelectedItem.Cells[1].Text;

    Label1.Text = "Into the Index Changed function";

    ToggleBitmap(waitingForApprovalJob.SelectedItem);
    buttonPanel.Visible = true;
    applicantListPanel.Visible = true;
    }

  • #57378
    Hi I checked the SelectedIndexChanged event, it is work, the Label1 can show "Into the Index Changed function". So what's happen to this PageIndexChangedevent?

    About you mentioned the control is going there in page changing_idex.... what can I do?

    Cheers


    private void waitingForApprovalJob_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    Session["selectedJobCode"] = waitingForApprovalJob.SelectedItem.Cells[1].Text;

    Label1.Text = "Into the Index Changed function";

    ToggleBitmap(waitingForApprovalJob.SelectedItem);
    buttonPanel.Visible = true;
    applicantListPanel.Visible = true;
    }

  • #57379
    Hi I checked the SelectedIndexChanged event, it is work, the Label1 can show "Into the Index Changed function". So what's happen to this PageIndexChangedevent?

    About you mentioned the control is going there in page changing_idex.... what can I do?

    Cheers


    private void waitingForApprovalJob_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    Session["selectedJobCode"] = waitingForApprovalJob.SelectedItem.Cells[1].Text;

    Label1.Text = "Into the Index Changed function";

    ToggleBitmap(waitingForApprovalJob.SelectedItem);
    buttonPanel.Visible = true;
    applicantListPanel.Visible = true;
    }


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.