Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have two grid views

In 1st grid view contains some records with select button.
when I select particular record on 1st grid view using select button then except that record remaining records will come in 2nd grid view.

How to write code for that one...
Posted

1 solution

Use row command event

C#
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.Row.Cells[2].Text == "Select")
        e.Row.Visible = false;
 }


Or

Use this
Gridview1.Rows.Item(i).Attributes.Add("style", "display:none")

Hope this will help you...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900