This is a migrated thread and some comments may be shown as answers.

ModalPopUp in RadGrid

1 Answer 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shehab
Top achievements
Rank 1
Shehab asked on 05 Nov 2008, 05:30 PM

<

 

radg:radgrid id="rgPhysician" runat="server" AllowFilteringByColumn="True" AllowSorting="True"AutoGenerateColumns="False" GridLines="None" EnableAJAX="True" Skin="WebBlue" >

 

 

 

 <MasterTableView>

 

 

 

 <Columns>

 

 

 

 <radG:GridTemplateColumn UniqueName="TemplateColumn" AllowFiltering="False">

 

 

 

 <ItemTemplate>

 

 

<asp:LinkButton ID="btnShowDetails" runat="server" CausesValidation="false" Text="Select" >

 

 

 

 </asp:LinkButton>

 

 

 

 <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1"

 

 

 

 OkControlID="btnOK" TargetControlID="btnShowDetails" BackgroundCssClass="modalBackground" DropShadow="true">

 

 

 

 </cc1:ModalPopupExtender>

 

 

 

 <asp:Panel ID="Panel1" runat="server" BackColor="Beige" Font-Bold="True" style="display: none">

 

 

 

 <table border="1" style="width: 500px; height: 300px">

 

 

 

 <tr>

 

 

 

 <td colspan="4">

 

 

 

 <img src="Images/a.gif" style="width: 25px; height: 18px" /><span style="font-size: 10pt"><strong>Aultman

 

Hospital Phone Book

</strong></span></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="width: 125px">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 Name:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="lblName" runat="server" Text='<%# Eval("PhysFullName") %>'></asp:Label></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="width: 125px">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 Speciality:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="Label1" runat="server" Text='<%# Eval("PhysSpeciality") %>'></asp:Label><strong><span style="font-size: 10pt"></span></strong></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="width: 125px">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 Extension:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="lblExt" runat="server" Text='<%# Eval("Ext") %>'></asp:Label><strong><span style="font-size: 10pt"></span></strong></td>

 

 

 

 </tr>

 

 

<tr>

 

 

 

 <td style="width: 125px;">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 Office:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="Label3" runat="server" Text='<%# Eval("Office") %>'></asp:Label></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="width: 125px;">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 FAX:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="Label5" runat="server" Text='<%# Eval("FAX") %>'></asp:Label></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="width: 125px;">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 Staff:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="Label2" runat="server" Text='<%# Eval("Denotes") %>'></asp:Label></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="width: 125px;">

 

 

 

 <strong><span style="font-size: 10pt">

 

 

 

 Practice:</span></strong></td>

 

 

 

 <td colspan="3">

 

 

 

 <asp:Label ID="Label4" runat="server" Text='<%# Eval("PhysPractice") %>'></asp:Label></td>

 

 

 

 </tr>

 

 

 

 <tr>

 

 

 

 <td style="text-align:center;" colspan="4">

 

 

 

 <asp:Button ID="btnOK" runat="server" Text="OK" Width="94px" /></td>

 

 

 

 </tr>

 

 

 

 </table>

 

 

 

 </asp:Panel>

 

 

 

 </ItemTemplate>

 

 

 

 </radG:GridTemplateColumn>

 

 

 

 <radG:GridBoundColumn DataField="PhysID" Display="False" HeaderText="PhysID"

 

 

 

 ReadOnly="True" UniqueName="PhysID">

 

 

 

 </radG:GridBoundColumn>

 

 

 

 <radG:GridBoundColumn DataField="ContactType" Display="False" HeaderText="ContactType"

 

 

 

 ReadOnly="True" UniqueName="ContactType">

 

 

 

 </radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="PhysFullName" HeaderText="Name" UniqueName="PhysFullName">

 

 

 

 </radG:GridBoundColumn>

 

 

 

 <radG:GridBoundColumn DataField="PhysSpeciality" HeaderText="Speciality" UniqueName="PhysSpeciality">

 

 

 

 </radG:GridBoundColumn>

 

 

 

 <%--<radG:GridBoundColumn DataField="PhysPractice" HeaderText="Practice" UniqueName="PhysPractice">

 

</radG:GridBoundColumn>

<radG:GridBoundColumn DataField="Denotes" HeaderText="Staff" UniqueName="Denotes">

</radG:GridBoundColumn>

<radG:GridBoundColumn DataField="Ext" HeaderText="Ext" UniqueName="Ext">

</radG:GridBoundColumn>--

 

%>

 

 

<radG:GridBoundColumn DataField="Office" HeaderText="Office" UniqueName="Office">

 

 

 

 </radG:GridBoundColumn>

 

 

 

 <%-- <radG:GridBoundColumn DataField="FAX" HeaderText="FAX" UniqueName="FAX">

 

</radG:GridBoundColumn>--

 

%>

 

 

</Columns>

 

 

 

 <RowIndicatorColumn Visible="False">

 

 

 

 <HeaderStyle Width="20px" />

 

 

 

 </RowIndicatorColumn>

 

 

 

 <ExpandCollapseColumn Visible="False">

 

 

 

 <HeaderStyle Width="19px" />

 

 

 

</ExpandCollapseColumn>

 

 

 

</MasterTableView>

 

</

 

radg:radgrid>

 

 

 

 

 

Hello All,

I had this issue with creating modalpopup inside radgrid and was able to fix it and it worked OK, now the problem I am having is when there are 304 records the select button freezes the page and works occasionaly.

I created the modalpopup to contain all the data so it wouldn't have to post back with the server when i click on the select button. Included is the code and HTML on the page. Any help would be really appreciated.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 07 Nov 2008, 01:23 PM
Hello Shehab,

When such big amount of data is loaded at once on the page, then it is expected that your performance might decrease, especially if the grid columns containing controls with rich client-side functionality. I suggest that you enable paging or virtual scrolling and paging for instance and check if it makes any difference.

For more ideas on performance optimization, review the following articles:
http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/ViewState/DefaultCS.aspx
http://www.telerik.com/help/aspnet-ajax/grdworkingwiththeajaxmode.html
http://www.telerik.com/help/aspnet-ajax/grdviewstatereductiontechniques.html
http://www.telerik.com/help/aspnet-ajax/grdsavinggridviewstateinsession.html

Give it a try and let me know ghow it goes.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Shehab
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or