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
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
To open the window in server side (C# or VB.net) use the below statement
<asp:ButtonField ButtonType="Link" DataTextField="Messageid" HeaderText="MessgaeID" CommandName="OpenMessageQu eue"/>
In RowCommand event of the grid you need to redirect the openqueue webpage
if (e.CommandName == "OpenMessageQueue")
{
Response.Redirect("openmes sagequeue. 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:Li nkButton>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1"
TargetControlID="LinkButto n1" BackgroundCssClass="modalB ackground" CancelControlID="imgClose"
OnCancelScript="HideModalP opup()">
</cc1:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField ButtonType="Link" DataTextField="Messageid" HeaderText="MessgaeID" CommandName="OpenMessageQu
In RowCommand event of the grid you need to redirect the openqueue webpage
if (e.CommandName == "OpenMessageQueue")
{
Response.Redirect("openmes
}
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:Li
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1"
TargetControlID="LinkButto
OnCancelScript="HideModalP
</cc1:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
ASKER
thanks for your reply all,
mine is a windows application.
mine is a windows application.
However you can apply the server side option for your code. linkbutton and Response.redirect use the corresponding syntax for window
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this is the solution helped me to solve the problem
Please check these out,
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlinkcolumn.aspx
http://stackoverflow.com/questions/5853743/hyperlink-column-in-datagrid-asp-net
Hope this helps.
Thanks.