CancelControlID="btnCloseGRP" BackgroundCssClass="modalBackground">
OnRowDataBound="GridViewGrp_RowDataBound" OnSelectedIndexChanged="GridViewGrp_SelectedIndexChanged"
ForeColor="#333333" GridLines="None" Width="100%" AllowPaging="True" OnPageIndexChanging="GridViewGrp_PageIndexChanging" PageSize="3"
EnableSortingAndPagingCallbacks = "true">
This is my gridview in popup window.. When I search for a record, popup window disappears but it is working. So I want to make popup still there when I click on search button.
Anyone please suugest me an answer,
Thank U..:)

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 31, 2013, 3:17 AM EDT
put this line of code within your search button click event:
mp1.Show();
shibasankar behera102 reputationPosted Aug 31, 2013, 3:24 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 31, 2013, 3:29 AM EDT
you are welcome.
happy coding........
shibasankar behera102 reputationPosted Aug 31, 2013, 3:36 AM EDT
Another thing, suppose I enter one record and It shows 7th row value in gridview.
But when I click on that searched result, by default it is taking 1st row value of gridview and displaying in textbox. How I can get that result value to the textbox??
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 31, 2013, 3:39 AM EDT
i didn't get your point plz provide clear details.
shibasankar behera102 reputationPosted Aug 31, 2013, 3:51 AM EDT
I think its happening coz book is in the 1st row in gridview.
plz see the attached file..
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 31, 2013, 3:58 AM EDT
plz check there is no attachment in your post.
shibasankar behera102 reputationPosted Aug 31, 2013, 4:06 AM EDT
Thank u
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 31, 2013, 4:14 AM EDT
from your screen shot. you want show the value of cricket in which textbox on selection.
Are you want to update the value of cricket.
shibasankar behera102 reputationPosted Aug 31, 2013, 4:18 AM EDT
But bydefault It is taking the 1st row value i.e book...
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 31, 2013, 4:21 AM EDT
plz provide your code where you assign cricket to parent page..
shibasankar behera102 reputationPosted Aug 31, 2013, 4:26 AM EDT
SqlCommand cmdPopGRP = new SqlCommand("select * from Group_Master", con);
cmdPopGRP.CommandType = CommandType.Text;
SqlDataAdapter daGRP = new SqlDataAdapter(cmdPopGRP);
DataSet dsGRP = new DataSet();
daGRP.Fill(dsGRP, "ssGrp");
GridViewGrp.DataSource = dsGRP.Tables["ssGrp"];
GridViewGrp.DataBind();
when I click on any row of gridview, the group name value will be set to dropdown(Item_GrpDropName).. below is the code..
protected void GridViewGrp_SelectedIndexChanged(object sender, EventArgs e)
{
if (GridViewGrp.SelectedIndex != -1)
{
GridViewRow row = GridViewGrp.SelectedRow;
Item_GrpDropName.SelectedValue = Item_GrpDropName.Items.FindByText(row.Cells[2].Text).Value;
}
}
this is for search-----
protected void btnGrpSrch_Click(object sender, EventArgs e)
{
try
{
SqlConnection con = new SqlConnection(" ");//connection name
con.Open();
string query = "select * from Group_Master where ((GrpMst_ID like'" + TextBoxGrpSrch.Text + "%') or(GrpMst_Name like'" + TextBoxGrpSrch.Text + "%'))";
SqlDataAdapter da = new SqlDataAdapter(query, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
GridViewGrp.DataSource = ds;
GridViewGrp.DataBind();
mp1.Show();
}
else
{
Response.Write(@"");
}
}
catch (Exception ex)
{
Response.Write(ex);
}
}
My gridview is in the popup window...