.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

GridView row edit in modal Window

Posted By: Shweta     Posted Date: March 09, 2011    Points:5   Category :ASP.Net
I have GridViewand bounded values in dynamically using databinder.

In the gridview I want add one hyperlink column and also if I click the hypaerlink column then one new modal dialog show appear with the selected gridView row value to edit.

its very urgent any send code to me I am using asp.net 4.0 with C#

Responses
Author: kamlesh             
Posted Date: March 09, 2011     Points: 20   

hi

check below site

http://devpinoy.org/blogs/keithrull/archive/2006/09/10/How-To_3A00_-Use-a-HyperLink-control-inside-a-GridView.aspx

http://geekswithblogs.net/AzamSharp/archive/2005/10/30/58551.aspx

Thanks And Regards.
Kamlesh Nikam
Author: Dhivya             
Posted Date: March 09, 2011     Points: 20   

<updatepanel>
<contenttemplate>
<asp:girdview>
<columns>
<asp:templatefield showheader="false">
<ItemTemplate>
<asp:Linlbutton id="lnkEdit" runat="server">
</ItemTemplate>
</asp:templatefield>
</columns>
</asp:gridview>
<asp:linkbutton id="lnkFake" runat="server"></asp:linkbutton>
<cc1:ModalPopupExtender id="popup" runat="server" dropshadow="false" popupcontrolid="pnlMsg" TargetControlId="lnkFake" backgroundcssclass="modalbackground">
</cc1:ModalPopupExtender>
</updatepanel>
</contenttemplate>
<asp:panel id="pnlMsg" runat="server">
<asp:textbox>
<asp:button>
</asp:panel>
Note:pnlMsg is used after updatepanel,otherwise u get 'defaut'(,)comma its display on textbox
lnkfake is a targetcontrolid

Author: Dhiraj Ranka             
Posted Date: March 09, 2011     Points: 20   

The links suggested by Kamlesh will give you the way to add the Hyperlink button in the grid view.

But if you want to open the modal popup then you can use AJAX modal popup control
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx

Or

you can use javascript popup like this
http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

in this you have to form the URL dynamically while updating the Hyperlink control in GridView.

Hope this helps.

Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend