Avatar of Sha1395
Sha1395
 asked on

Hyper Link Datagrid view

Hello All,

Eventually i filled all the msmq data in to my datagridview and i have one column is a hyper linked column.

Now am trying to do something like ...every time i click the hyper link column then open the new window and populate the value.

Attached my datagridview with values.

For example my message id : 12345 then i click the hyper link  ,it will open the pop up window then display the Queue value that is "Q1"

Thanks in Advance.


Grid.png
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Sha1395

8/22/2022 - Mon
veenaravind

jawaharroy

To open the window in server side (C# or VB.net) use the below statement
<asp:ButtonField ButtonType="Link" DataTextField="Messageid" HeaderText="MessgaeID" CommandName="OpenMessageQueue"/>
In RowCommand event of the grid you need to redirect the openqueue webpage
if (e.CommandName == "OpenMessageQueue")
{
Response.Redirect("openmessagequeue.aspx")
}

handle this in client side you need ajax for this
<asp:TemplateField HeaderText="MessageQueue">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Bind("MessgeID") %>' ToolTip="Messgae"></asp:LinkButton>
                                        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1"
                                            TargetControlID="LinkButton1" BackgroundCssClass="modalBackground" CancelControlID="imgClose"
                                            OnCancelScript="HideModalPopup()">
                                        </cc1:ModalPopupExtender>
                                    </ItemTemplate>
                                </asp:TemplateField>
Sha1395

ASKER
thanks for your reply all,

mine is a windows application.
Your help has saved me hundreds of hours of internet surfing.
fblack61
jawaharroy

However you can apply the server side option for your code. linkbutton and Response.redirect use the corresponding syntax for window
ASKER CERTIFIED SOLUTION
Sha1395

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Sha1395

ASKER
this is the solution helped me to solve the problem