473,388 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

"codeless" nested gridviews...there has to be a better way

Roy
Hey all. Below is the nested syntax on how to make a "codeless" nested
gridview embedded within another gridviews templatefield column. Only
problem is that it loads slow. REAL SLOW. There has to be a better way.
Suggestions anyone? By the way, I'm not opposed to coding, it just
seems like this should be easily doable on the aspx side of things.

Summary:
I'm stuffing the 3 three key fields from each row in the master
gridview into invisible labels, then pulling that data from them into
the nested sqldatasource which is in turn bound to the nested gridview.

Code:
<asp:TemplateField>
<ItemTemplate>

<asp:Label ID="t1" runat="server" Text='<%#Eval("van") %>'
Visible="false" />
<asp:Label ID="t2" runat="server" Text='<%#Eval("tcon") %>'
Visible="false" />
<asp:Label ID="t3" runat="server" Text='<%#Eval("carr") %>'
Visible="false" />

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:PATConnectionString %>"
SelectCommand="ww_nested" SelectCommandType="storedprocedure">
<SelectParameters>
<asp:ControlParameter ControlID="t1" Name="van" Type="string" />
<asp:ControlParameter ControlID="t2" Name="tcon" Type="string" />
<asp:ControlParameter ControlID="t3" Name="carr" Type="string" />
</SelectParameters>
</asp:SqlDataSource>

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
DataSourceID="sqldatasource1" DataKeyNames="UID" AllowPaging="false"
AllowSorting="false">
<Columns>
<asp:BoundField DataField="UID" HeaderText="UID" ReadOnly="True"
Visible="false"/>
<asp:BoundField DataField="EVENT_DESCRIPTION" HeaderText="Event
Description" />
<asp:BoundField DataField="Event" HeaderText="Event" />
<asp:BoundField DataField="EventDt" HeaderText="EventDt" />
<asp:BoundField DataField="EventLocation" HeaderText="Location" />
<asp:BoundField DataField="ShipName" HeaderText="Ship Name" />
</Columns>
</asp:GridView>

</ItemTemplate>
</asp:TemplateField>

Jun 16 '06 #1
1 1926
Roy
Doh.
Forgot to index the three fields in SQL Server. Having done that the
load times are now within acceptable limits. :) Though if anyone has
any tips to streamline or speed up the code, please let me know!

Jun 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mrhicks | last post by:
Hello all, I have a question regarding efficeny and how to find the best approach when trying to find flag with in a structure of bit fields. I have several structures which look similar to ...
3
by: baibaichen | last post by:
hi i want to output strings with indent space, the code looks like: std::set<std::string> files; std::set<std::string> iterator b = files.begin(); std::set<std::string> iterator e =...
0
by: manuel.ricca | last post by:
Hello, I'm trying to create a table with 2 nested gridviews and then a DetailsView on the right. The DetailsView should show the details of the item selected in the 2nd (nested) GridView: My...
0
by: Ja NE | last post by:
I would like to offer my registered users to have very short uri for their pages in our comunity site, so I have enabled wildcard dns *.bellay.com. and added virtaul host for it. (I'm testing this...
1
by: Chris | last post by:
I am creating a nested gridview as per the tutorial here (http://msdn2.microsoft.com/en-us/library/aa992038(vs.80).aspx). My gridviews work fine. I have a master gridview containing the customerid....
0
by: titia111 | last post by:
I am new to 2.0 and am using nested gridviews. The first one contains category information, the second is based on a query from a product table. The data is pulling correctly, but the problem is...
3
by: ThatsIT.net.au | last post by:
I'm looking for a very simple nested grid view example. Also I have been creating tables instead of using gridview for complex tasks or just spitting out html from code. Do you recommend using...
2
by: Mr Nobody | last post by:
Hi all, I have two user controls that contain there respective own gridview and objectdatasource. Now when i add both controls to a page, i want gridview A's selected value to be a parameter...
0
by: omgdork | last post by:
Hi! I'm having trouble on how to proceed with inserting data that are in parent and child gridviews. I have a gridview with nested gridviews that looks like this: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.