On Mar 30, 9:02*am, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
> "MLightsOut" <MLights...@gmail.com> wrote in message
>
> news:c521f789-4d9b-4332-8aa9-...
>
>
>
>
>
> >> Do yourself a *HUGE* favour and abandon the completely non-standard
> >> showModalDialog stuff.
>
> >> Use an AJAX modal popup extender
> >> instead:http://www.asp.net/ajax/ajaxcontrolt...lpopup/modalpo...
>
> >> All of your current problems will simply disappear, and you'll be
> >> standards
> >> compliant.
>
> > I am using the AJAX modal popup extender now. *Now when I click on the
> > imgNote button in the GridView it will show my Panel1 data in a AJAX
> > modal popup window. *My Panel1 contains another gridview, how do I
> > update the gridview in the popup window to display the correct
> > information? *How do I pass this information to the popup? *Any help
> > would be greatly appreciated.
>
> Exactly the same way you would update it if it weren't inside an AJAX modal
> popup - all the popup does is unhide a floating div to display its contents.
>
> How have you constructed the GridView? Are you doing in-place editing e.g..
> with an Edit button?
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net- Hide quoted text -
>
> - Show quoted text -
No I am not using an edit button. The imgNote button resides in the
Item Template of the parent window's GridView control. When the user
clicks the imgNote button the AJAX modal popup extender will appear
and display another gridview (called gvNotes which resides inside
Panel1) containing all of the notes for that given task. So somehow I
would need to update those two querystring fields to the correct
values to show the correct note(s) in the gvNotes control. That is
where I am stuck.
<asp:TemplateField
HeaderText="Notes">
<EditItemTemplate>
</
EditItemTemplate>
<ItemTemplate>
<asp:TextBox ID="txtNote" runat="server" Height="20px"
TextMode="MultiLine" Text='<%# Bind("[Notes]")%>' Font-Names="Verdana"
Font-Size="Small" ReadOnly="True" Width="312px" ></
asp:TextBox><asp:ImageButton ID="imgNote" runat="server"
BorderStyle="Outset" BorderWidth="3px"
ImageUrl="~/images/Note.bmp" OnClick="imgNote_Click" ToolTip="Manage
Notes For This Task" />
<cc1:ModalPopupExtender ID="mpe" runat="server"
BackgroundCssClass="modalBackground" cancelcontrolid="cmdCancel"
dropshadow="true" okcontrolid="cmdOK" onokscript="onOk()"
popupcontrolid="Panel1" targetcontrolid="imgNote">
</
cc1:ModalPopupExtender>
<asp

anel
ID="Panel1" runat="server" BorderStyle="Outset" BorderWidth="2px">
<table
border="0" cellpadding="4" cellspacing="4" style="font-size: small;
font-family: Verdana; background-color: white;">
<tr>
<td colspan="2" style="background-color: silver">
<asp:Label ID="lblNoteHistory" runat="server" Text="Note History"></
asp:Label><br />
<asp:GridView ID="gvNotes" runat="server" AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Fab #,Task
Order,Note ID"
DataSourceID="sqlTaskNotes" EmptyDataText="No Records Exist."
EnableSortingAndPagingCallbacks="True"
ForeColor="#333333">
<RowStyle BackColor="#E3EAEB" />
<Columns>
<asp:BoundField DataField="Note ID" HeaderText="ID" ReadOnly="True"
SortExpression="Note ID" />
<asp:BoundField DataField="Note Date" DataFormatString="{0:d}"
HeaderText="Date"
HtmlEncode="False" SortExpression="Note Date" />
<asp:BoundField DataField="Note" HeaderText="Note"
SortExpression="Note" />
</Columns>
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="Maroon" ForeColor="White"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
</
tr>
<tr>
<td colspan="2">
<asp:Label ID="Label1" runat="server" Text="Add a New Note"></
asp:Label> -
<asp:Label ID="lblDate" runat="server"></asp:Label><br />
<asp:TextBox ID="TextBox1" runat="server" Height="128px"
TextMode="MultiLine" Width="672px"></asp:TextBox><br />
<asp:Button ID="cmdAddNewNote" runat="server" Text="Add New Note"
Visible="False"
Width="152px" /></td>
</
tr>
<tr>
<td style="padding-right: 20px; text-align: right; height: 40px;">
<asp:Button ID="cmdOK" runat="server" Height="26px" Text="Done"
Width="128px" /></td>
<td style="padding-left: 20px; height: 40px;">
<asp:Button ID="cmdCancel" runat="server" Height="26px" Text="Cancel"
Width="128px" /></td>
</
tr>
</
table>
<asp:SqlDataSource ID="sqlTaskNotes" runat="server" ConnectionString="<
%$ ConnectionStrings:MYSQLSrv Access DbConnectionString %>"
SelectCommand="SELECT * FROM [PMJ TASK NOTES] WHERE (([Task Order] =
@Task_Order) AND ([Fab #] = @column1)) ORDER BY [Task Order], [Note
ID]">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="12345" Name="column1"
QueryStringField="p1"
Type="String" />
<asp:QueryStringParameter DefaultValue="1" Name="Task_Order"
QueryStringField="p2"
Type="Int32" />
</
SelectParameters>
</
asp:SqlDataSource>
</
asp

anel>
</
ItemTemplate>
<ItemStyle
Wrap="False" />
</
asp:TemplateField>