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

    How to fetch all selected record from all pages of gridview at time in buttonclick event?

    I am showing record in grid(contain checkbox as first column) that has paging.If I select record in page one and move to second page selected record from first get unchecked.Shall I make enable viewstate?What will happen?Can I able to fetch all record(id) which are selected from all pages of grid at a time in button click event?

    foreach (GridViewRow rowItem in Gridview1.Rows)
  • #762513

    You can previous gridview value assign to view state try this code .

    I have replied in your old question.

    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
    for (int i = 0; i < ddsales.Rows.Count; i++)
    RadioButton rb = (RadioButton)ddsales.Rows[i].Cells[0].FindControl("RadioButton1");
    if (rb.Checked == true)
    Label lqtyyytno = (Label)ddsales.Rows[i].Cells[1].FindControl("lqtyyytno");
    ViewState["lotno"] = lqtyyytno.Text;

    try and let me know this code did not fixed in your issue means.

    Name : Dotnet Developer-2015
    Email Id

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #762526
    Hi Pinky,

    It's too difficult to answer your question in single line. So, that only I prepare an article for the same, please go through that link and understand each and every step and go a head, if you have any doubt please ask me. " "

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

Sign In to post your comments