Please Help me out.... I am new to ASP.net programming..
I have a a main page and on that page i have a button Button1 , now on clicking that button a panel is supposed to popup.
<ajaxToolkit:ModalPopupExtender ID="modelPopupExtender1"
CancelControlID="Btcancel"
PopupControlID="Panel1" TargetControlID="Button1"
Drag="true" BackgroundCssClass="ModelPopupBG"
runat="server" DropShadow="True"
>
Now in Panel1 i have 2 image buttons. 1) to search out the entered data(i am using a textbox for entry) and fill the data into the gridview1 and 2) to cancel the popup.
<asp:Panel ID="Panel1" runat="server" >
<div class="HelloWorldPopup">
<div class="PopupBody">
<div class="PopupHeader" id="PopupHeader"><b ><p style="margin-top: 10px"> Selection Panel</p></b></div><div id="UpperBody">
<table border="1" runat="server">
<tr>
<th >
<asp:TextBox ID="entry" runat="server"></asp:TextBox></th><th>
<asp:DropDownList ID="DropDownList1" runat="server" CssClass="dropdowns">
<asp:ListItem Text="Name" >
</asp:ListItem><asp:ListItem Text="Address" >
</asp:ListItem><asp:ListItem Text="Telephone">
</asp:ListItem></asp:DropDownList></th><th>
<asp:ImageButton ID="Btok" runat="server" onclick="Btok_Click" ImageUrl="~/images/isearch.png"/>
</th>
<th >
<asp:ImageButton ID="Btcancel" runat="server" ImageUrl="~/images/cancel.gif" />
</th>
</tr>
</table>
</div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
style="margin-top: 11px" BackColor="White" BorderColor="White"
BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"
GridLines="None" Width="100%" onselectedindexchanged="GridView1_SelectedIndexChanged" >
<Columns>
<asp:BoundField DataField="id" HeaderText="ID" Visible="False" />
<asp:BoundField DataField="name" HeaderText="Name" />
<asp:BoundField DataField="address" HeaderText="Address" />
<asp:BoundField DataField="telephone" HeaderText="Telephone" />
<asp:CommandField HeaderText="Select" ShowSelectButton="True" />
</Columns>
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
<PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
<RowStyle BackColor="#DEDFDE" ForeColor="Black" />
<SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#594B9C" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#33276A" />
</asp:GridView>
</div>
everything is fine but only problem i am facing is that the whole page is being refreshed instead of just the gridview1 while i just want to refresh the gridview1 data when i click on BtOk
I guess using updatePanel for that gridView can sort things out for me.. but don't know how ...
What should I do??
I think you have the answer - UpdatePanel (that's one approach)
<asp:UpdatePanel runat="server" ID="GridUpdatePanel">
<ContentTemplate>
<asp:GridViewID="GridView1" runat="server">
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Simply create an UpdatePanel tag, and put your GridView between the ContentTemplate
Related
I am customizing one website but , while using triggers in update panel the click event is not firing.
SOURCE CODE:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
Also see the Content Template
<ContentTemplate>
<table width="100%">
<tr>
<td>
<cc1:accordion id="Accordion1" runat="server" headercssclass="headeraccordian">
<panes>
<cc1:accordionpane ID="AccordionPane1" runat="server">
<header>
<a href="#">
<asp:Label ID="dailyreport" CssClass="lbl" runat="server" Text="Daily Report"></asp:Label></a>
</header>
<content>
<div>
<asp:TextBox ID="txtDate" runat="server" ReadOnly="True" Width="94px"></asp:TextBox>
<asp:Button ID="btnCal" runat="server" Text="Select Date" OnClick="btnCal_Click" />
<asp:Button ID="btnDownLoads" runat="server" Text="Download" OnClick="btnDownLoads_Click" />
<asp:Calendar ID="cal" runat="server" OnSelectionChanged="cal_SelectionChanged" BackColor="White"
BorderColor="White" BorderWidth="1px" Font-Names="Verdana" Font-Size="9pt" ForeColor="Black"
Height="190px" NextPrevFormat="FullMonth" Width="350px">
<SelectedDayStyle BackColor="#333399" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" />
<OtherMonthDayStyle ForeColor="#999999" />
<NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" VerticalAlign="Bottom" />
<DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
<TitleStyle BackColor="White" BorderColor="Black" BorderWidth="4px" Font-Bold="True"
Font-Size="12pt" ForeColor="#333399" />
</asp:Calendar>
</div>
</content>
</cc1:accordionpane>
</panes>
</cc1:accordion>
</td>
</tr>
</table> </ContentTemplate>
Also see the triggers
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnDownLoads" EventName="Click"/>
</Triggers></asp:UpdatePanel>
Do let me know why it is not happening
Remove triggers. It will start working fine.
If the button is in the header section you should put:
SuppressHeaderPostbacks="False"
In the AccordionPane.
That worked for me.
I have a grid view and inside that i have some link button. What I am trying to do is when i clicked on link-button then two more buttons which is outside of grid view should be shown.
I searched it on google and i found some solutions as well. I set command name of linkbutton and on RowCommand event i write below code. But still those buttons are not shown to me.
Can you please help me.....
Code of Gridview:
<asp:Panel ID="Panel1" runat="server">
<fieldset>
<legend>Action</legend>
<table border='0' align='center'>
<tr>
<td align="center">
<asp:Button ID="btnShow" runat="server" Text="Show" />
</td>
<td align="center">
<asp:Button ID="btnRefresh" runat="server" Text="Reset" />
</td>
<td align="center">
<asp:Button ID="btnexptocsv" runat="server" Text="Export To CSV" Enabled="False" />
</td>
<td align="center">
<asp:Button ID="btnexptoexcel" runat="server" Text="Export To Excel" Enabled="False" />
</td>
</tr>
</table>
</fieldset>
</asp:Panel>
<asp:UpdatePanel ID="updgrd" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<fieldset>
<legend>Complaint Count </legend>
<asp:GridView ID="grd_ComplaintCount" runat="server" AutoGenerateColumns="False"
CellPadding="4" EnableModelValidation="True" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="Total Complaint">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbtn_TotalComplaint" CommandName="lnkTotal" Text='<%#Bind("TotalComplaint") %>'
CommandArgument="Total"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total Open Complaint">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbtn_TotalOpenComplaint" CommandName="lnkOpen"
Text='<%#Bind("TotalOpen") %>' CommandArgument="Open"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total Closed Complaint">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbtn_TotalCloseComplaint" CommandName="lnkClosed"
Text='<%#Bind("TotalClose") %>' CommandArgument="Closed"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total Reassigned Complaint">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbtn_TotalReassignedComplaint" CommandName="lnkReassign"
Text='<%#Bind("TotalMemberReAssign") %>' CommandArgument="Reassigned"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total Observation Complaint">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbtn_TotalObservationComplaint" CommandName="lnkObeservation"
Text='<%#Bind("TotalObservation") %>' CommandArgument="Observation"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
</asp:GridView>
</fieldset>
<fieldset>
<legend>
<asp:Label runat="server" ID="Legend_Remark"></asp:Label></legend>
<asp:GridView ID="grd_ComplaintDetails" runat="server" AutoGenerateColumns="False"
CellPadding="4" EnableModelValidation="True" ForeColor="#333333" GridLines="None"
AllowPaging="True" PageSize="20">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="MemberComplaintID" DataNavigateUrlFormatString="frmComplaintActionDetails.aspx?CID={0}"
DataTextField="MemberComplaintNo" HeaderText="Complaint No" />
<asp:BoundField DataField="MemberCode" HeaderText="Member Code" />
<asp:BoundField DataField="DepartmentName" HeaderText="Service Area" />
<asp:BoundField DataField="ComplaintName" HeaderText="Type Of Complaint" />
<asp:BoundField DataField="AutoEscalation" HeaderText="Auto Escalation" />
<asp:BoundField DataField="ManualEscalation" HeaderText="Manual Escalation" />
<asp:BoundField DataField="ComplaintDate" HeaderText="Complaint Date" />
<asp:BoundField DataField="LastActionTakenBy" HeaderText="Last Action TakenBy" />
<asp:BoundField DataField="LastActionDate" HeaderText="Last ActionDate" />
<asp:BoundField DataField="Severity" HeaderText="Severity" />
<asp:BoundField DataField="ComplaintAction" HeaderText="Complaint Action" />
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#507CD1" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
</asp:GridView>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
Code of Rowcommand event:
Protected Sub grd_ComplaintCount_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles grd_ComplaintCount.RowCommand
ComplaintCount_Detail(e.CommandArgument)
If e.CommandName = "lnkTotal" Then
btnexptocsv.Enabled = True
btnexptoexcel.Enabled = True
ElseIf e.CommandName = "lnkOpen" Then
btnexptocsv.Enabled = True
btnexptoexcel.Enabled = True
ElseIf e.CommandName = "lnkClosed" Then
btnexptocsv.Enabled = True
btnexptoexcel.Enabled = True
ElseIf e.CommandName = "lnkReassign" Then
btnexptocsv.Enabled = True
btnexptoexcel.Enabled = True
ElseIf e.CommandName = "lnkObeservation" Then
btnexptocsv.Enabled = True
btnexptoexcel.Enabled = True
Else
btnexptoexcel.Enabled = False
btnexptocsv.Enabled = False
End If
End Sub
My Question :How to Show Buttons (which is outside of grid view) after Link Button Clicked
(which is inside of gridview)
Put your buttons inside the UpdatePanel
I have a Gridview with UpdateProgress, UpdatePanel and Linkbutton in gridview row TemplateField. When I click the Linkbutton, the UpdateProgress should work, but not in my case.
Here's the code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="CustomerID"
onpageindexchanging="GridView1_PageIndexChanging" Width="500px"
onrowcommand="GridView1_RowCommand"
onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:BoundField DataField="CustomerID" HeaderText="Customer ID" />
<asp:BoundField DataField="CompanyName" HeaderText="Company" />
<asp:BoundField DataField="City" HeaderText="City" />
<asp:TemplateField>
<ItemTemplate>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2" >
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/ajax-loader.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode= "Conditional" >
<ContentTemplate>
<asp:LinkButton ID="lbtnExecute" runat="server" CommandArgument="<%# ((System.Web.UI.WebControls.GridViewRow)(Container)).DataItemIndex + 1 %>"
CommandName="Execute">Execute</asp:LinkButton>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lbtnExecute" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<SortedAscendingCellStyle BackColor="#FEFCEB" />
<SortedAscendingHeaderStyle BackColor="#AF0101" />
<SortedDescendingCellStyle BackColor="#F6F0C0" />
<SortedDescendingHeaderStyle BackColor="#7E0000" />
</asp:GridView>
I tried removing the:
AssociatedUpdatePanelID="UpdatePanel2"
but UpdateProgress showed in all rows. I want it to show only on the row where I click the Linkbutton.
Can anyone help?
I have a Grid view in which a text box is present in footer and edit template from where user can update data. i made a table inside a empty template of a grid and add a server side text box on it so that user can insert data in a grid if there is no record present inside a grid.
There is a server side button present out side the grid, on clicking of that button i m saving the data that user insert or update via grid. Now i am facing the problem to find out the control present inside the empty template of the grid while i m saving the data.
My code looks like as :
<asp:GridView ID="grwBrandInfo" runat="server" Width="100%" HeaderStyle-CssClass="gridheaderstyle"
GridLines="Vertical" AutoGenerateColumns="false" ShowFooter="True" BackColor="White"
OnRowCommand="grwBrandInfo_RowCommand" OnRowEditing="grwBrandInfo_RowEditing"
OnRowDeleting="grwBrandInfo_RowDeleting" OnRowUpdating="grwBrandInfo_RowUpdating"
OnRowDataBound="grwBrandInfo_RowDataBound" OnRowCancelingEdit="grwBrandInfo_RowCancelingEdit"
BorderStyle="None">
<Columns>
<asp:TemplateField HeaderText="Quarts">
<ItemTemplate>
<%#Eval("QUARTS")%>
<asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='<%#Eval("PERMIT_QUANTITY_ID") %>' />
<asp:HiddenField ID="hdnQuarts" runat="server" />
</ItemTemplate>
<FooterTemplate>
<asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='<%#Eval("PERMIT_QUANTITY_ID") %>' />
<asp:TextBox ID="txtFootQuarts" runat="server" CssClass="txtfields" MaxLength="4"></asp:TextBox>
</FooterTemplate>
<EditItemTemplate>
<asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='<%#Eval("PERMIT_QUANTITY_ID") %>' />
<asp:TextBox ID="txtEditQuarts" runat="server" EnableViewState="false" Text='<%#Eval("QUARTS")%>'
CssClass="txtfields" MaxLength="4"></asp:TextBox>
</EditItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
<FooterStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField>
<FooterTemplate>
<asp:LinkButton ID="lbtnInsert" runat="server" Text="Insert" CssClass="hypfield"
CommandName="Insert" ValidationGroup="save"></asp:LinkButton>
</FooterTemplate>
<FooterStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:CommandField ShowEditButton="True" HeaderText="Action" ShowDeleteButton="true"
ValidationGroup="save">
<ItemStyle CssClass="hypfield" HorizontalAlign="Center" VerticalAlign="Top" />
<ControlStyle CssClass="hypfield" />
<HeaderStyle HorizontalAlign="Center" />
</asp:CommandField>
</Columns>
<EmptyDataTemplate>
<table border="1" cellpadding="5" cellspacing="0" width="100%">
<tr align="Left" bgcolor="#726E6D">
<td>
<b>
<asp:HiddenField ID="hdnPERMIT_QUANTITY_ID" runat="server" Value='0' />
<asp:Label ID="lblQuarts" runat="server" ForeColor="white" Text="Quarts" CssClass="lblfields"></asp:Label></b>
</td>
</tr>
<tr align="left" id="trEntryNotCompleted" runat="server" bgcolor="#FFFFEE">
<td>
<asp:TextBox ID="txtQuarts" runat="server" CssClass="txtfields5char" MaxLength="4"></asp:TextBox>
</td>
</tr>
</table>
</EmptyDataTemplate>
<FooterStyle BackColor="#CCCC99" />
<RowStyle BackColor="#F7F7DE" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="#6B696B" CssClass="gridheaderstyle" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="save" OnClick="btnSave_Click" />
So the problem is that how did i find the value of txtQuarts present in the empty template when i am saving data
Dim txtId As String = CType(gridHelpDesk.Controls(0).Controls(0).FindControl("txtId"), TextBox).Text
I am using a ModalPopupExtender within an updatePanel to show a detailView when a user selects a "Details" Button within a GridView.
The problem is that when the button is selected the popup is not being displayed. I have stepped through the code and the mdlPopup.Show() method is being executed but the popup does not "Show" Could someone perhaps help me out with what is happening?
Here is my Code:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetRequests"
TypeName="RequestDAL" SortParameterName="SortExpression"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSourceDetails" runat="server" SelectMethod="GetRequestsDetail"
OnSelecting="OdsDetail_Selecting" TypeName="RequestDAL"></asp:ObjectDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="RequestID"
DataSourceID="ObjectDataSource1" EnableModelValidation="True" AllowSorting="True"
CellPadding="10" ForeColor="#333333" GridLines="None" OnSelectedIndexChanged="gv_SelectedIndexChanged">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="DateSubmit" HeaderText="DateSubmit" SortExpression="DateSubmit" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="lName" />
<asp:BoundField DataField="FirstDate" HeaderText="Date" SortExpression="FirstDate" />
<asp:BoundField DataField="BeginTime" HeaderText="Begin Time" SortExpression="beginTime" />
<asp:BoundField DataField="EndTime" HeaderText="End Time" SortExpression="endTime" />
<asp:BoundField DataField="Lab" HeaderText="Lab" SortExpression="room" />
<asp:BoundField DataField="ClassName" HeaderText="Class" SortExpression="Class" />
<asp:BoundField DataField="Semester" HeaderText="Semester" SortExpression="term" />
<asp:BoundField DataField="RequestID" HeaderText="RequestID" SortExpression="id" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btnDetails" runat="server" Text="Details" CommandName="Select" /></ItemTemplate>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
</asp:GridView>
<asp:Panel ID="pnlPopup" runat="server" Style="display: none" Width="500px">
<asp:UpdatePanel ID="updatePnlRequestDetail" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
<Ajax:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="btnShowPopup"
PopupControlID="pnlPopup" CancelControlID="btnClose" BackgroundCssClass="modalBackground" />
<asp:Label ID="lblRequestDetail" runat="server" Text="Request Detail" BackColor="LightBlue"
Width="95%"></asp:Label>
<asp:DetailsView ID="dvRequestDetail" DataSourceID="ObjectDataSourceDetails" runat="server"
DefaultMode="Edit" Width="95%" BackColor="White" Visible="false">
<Fields>
<asp:BoundField HeaderText="Id" DataField="RequestID" /></Fields>
</asp:DetailsView>
<asp:LinkButton runat="server" ID="btnClose" Text="Close" CausesValidation="false"></asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
protected void gv_SelectedIndexChanged(object sender, EventArgs e) {
//show the detail view to render
dvRequestDetail.Visible = true;
// force the databinding
dvRequestDetail.DataBind();
// update the detail panel
updatePnlRequestDetail.Update();
//show the popup
mdlPopup.Show();
}
protected void OdsDetail_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
try
{
e.InputParameters["id"] = Convert.ToString(this.GridView1.DataKeys[this.GridView1.SelectedIndex].Value);
}
catch(Exception ex)
{
throw new Exception(ex.Message);
}
}
This is all taken from a tutorial I found for using Modal Popup extenders with ObjectDataSources http://mattberseth.com/blog/2008/04/masterdetail_with_the_gridview.html
2 thing I whould do:
set your GridView as a AsyncPostBackTrigger for the popup UpdatePanel.
put the TargetControl and the ModalPopupExtender outside of the PopupControl Panel.
<asp:Panel ID="pnlPopup" runat="server" Style="display: none" Width="500px">
<asp:UpdatePanel ID="updatePnlRequestDetail" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="GridView1" />
</Triggers>
<ContentTemplate>
<asp:Label ID="lblRequestDetail" runat="server" Text="Request Detail" BackColor="LightBlue" Width="95%"></asp:Label>
<asp:DetailsView ID="dvRequestDetail" DataSourceID="ObjectDataSourceDetails" runat="server" DefaultMode="Edit" Width="95%" BackColor="White" Visible="false">
<Fields>
<asp:BoundField HeaderText="Id" DataField="RequestID" />
</Fields>
</asp:DetailsView>
<asp:LinkButton runat="server" ID="btnClose" Text="Close" CausesValidation="false"></asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
<Ajax:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="btnShowPopup" PopupControlID="pnlPopup" CancelControlID="btnClose" BackgroundCssClass="modalBackground" />