sk1922
asked on
Gridview Row Selection in ModalPopupExtender [Using VB]
Hello EE!
I need some assistance in implementing the correct script for a gridview control that is displayed using the ModalPopupExtender control. Currently I have a panel that has a gridview control (gv1) and I'm trying to "select" a row and get the datakey for that given row. I've added a RowCommand event to my code behind and using e.CommandArguement.ToStrin g() to get my row value which does work. However, my real concern is a flicker that takes place when I select the row... how can I eliminate this? I want to keep my modal window open without a flicker.
Any guidance or suggestions will be greatly appreciated.
I need some assistance in implementing the correct script for a gridview control that is displayed using the ModalPopupExtender control. Currently I have a panel that has a gridview control (gv1) and I'm trying to "select" a row and get the datakey for that given row. I've added a RowCommand event to my code behind and using e.CommandArguement.ToStrin
Any guidance or suggestions will be greatly appreciated.
Protected Sub gv1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gv1.RowCommand
If e.CommandName = "Select" Then
ModalPopupExtender1.Show()
Dim empID As Integer = e.CommandArgument.ToString()
Label1.Text = empID.ToString
End If
End Sub
=====
.aspx
=====
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Panel ID="PanelOutter" runat="server" CssClass="modalBoxImg" Style="display: none;">
<div class="modalInner">
<div class="modalTitle">
I am ...
</div>
<asp:GridView ID="gv1" runat="server" DataKeyNames="EMP_ID" OnRowCommand="gv1_RowCommand">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="selectEmp" runat="server" CommandArgument='<%# Eval("EMP_ID") %>' CommandName="Select">View Details</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Button ID="Process" runat="server" Text="This is me" />
<asp:Button ID="Cancel" runat="server" Text="Cancel" />
<asp:Label ID="Label1" runat="server" />
</div>
</asp:Panel>
<asp:Button ID="ShowBtn" runat="server" Text="Button" Style="display: none;" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="ShowBtn" CancelControlID="Cancel" PopupControlID="PanelOutter" BackgroundCssClass="bgModal">
</cc1:ModalPopupExtender>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I appreciate the insight experts!