Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
protected void popuplink_Click(object sender, EventArgs e)
{
try
{
 
foreach (GridViewRow i in gvuser.Rows)
{
 

RadioButton rb = (RadioButton)i.FindControl("Radselect");
if (rb.Checked && rb != null)
{
 
txtmodusername.Text = i.Cells[2].Text;
txtfullname.Text = i.Cells[3].Text;
txtmodemail.Text = i.Cells[4].Text;
ddlmodpermission.SelectedItem.Text = i.Cells[5].Text;
Checkbox3.Visible = i.Cells[6].Visible;
 

this.Btn_Modify_ModalPopupExtender.Show();
}
}
}
<asp:Button ID="popuplink"
                                runat="server" Text="Modify" OnClick="popuplink_Click" /><cc1:ModalPopupExtender
                                    ID="Btn_Modify_ModalPopupExtender" runat="server" TargetControlID="Btntest" CancelControlID="popupclose"
                                    PopupControlID="Panel2" Enabled="True" DynamicServicePath="" BackgroundCssClass="ModalPopupBG">
                                </cc1:ModalPopupExtender>
 
When i am debuging,values assign to textbox controls.but popup does not show.
Posted 14-Nov-12 21:10pm
skumarn654
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

create a javascript function and bing This Javascript function to gridview rowdatabound event.
and
show your modalPopup using javascript ...
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

are you opening your popup on on gridview event if yes then you can store the row id on that event in session or cookies. do the same code but change the condition in "if" just check the i rowid and find the control of that row so you can have the all value in your controls... hope it will help you......Smile | :)
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 255
3 Shweta N Mishra 216
4 PIEBALDconsult 174
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100