Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am having grid view displayed in page load having some columns.In the last column of all the records i am having one link button called detail.If i click the details link button i want to display the details in the pop up window.

Please help me in this regard.

Thanks in Advance.
Posted
Updated 21-Jun-11 19:36pm
v2

u can use showModalDialog() for this in javascript.

Find your edit control in gridview rowdatabound event and call javascript function from that with ID as parameter.

Search for showModalDialog() and u will get all details.
 
Share this answer
 
 
Share this answer
 
Comments
[no name] 22-Jun-11 3:13am    
Nice Link My 5.
parmar_punit 22-Jun-11 6:25am    
Thanks Koushik
[no name] 22-Jun-11 9:13am    
It's my pleasure.
RaviRanjanKr 22-Jun-11 7:24am    
Good Links, My 5 :)
You can use like this

XML
<asp:DataGrid ID="DataGrid1" runat="server" Width="90%" AutoGenerateColumns="False"
            ShowHeader="False">
            <ItemStyle BackColor="DarkCyan"></ItemStyle>
            <Columns>
                <asp:TemplateColumn>
                    <ItemTemplate>
                        <a href="#"><%# Eval("gender")%></a>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="total" HeaderText="Total">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
            </Columns>
        </asp:DataGrid>


And you can add Your Link.

You have to add a popup javascript file and chang the href value.

Examples : Popup Examples[^]

Thanks
 
Share this answer
 
Comments
RaviRanjanKr 22-Jun-11 7:23am    
Nice Answer, My 5 :)
Tarun Mangukiya 22-Jun-11 9:22am    
Thanks for your reply
[no name] 22-Jun-11 9:13am    
Good Call. My 5 too.
Tarun Mangukiya 22-Jun-11 9:22am    
Thanks

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