473,548 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"codeless" nested gridviews...the re 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:TemplateFi eld>
<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:SqlDataSou rce ID="SqlDataSour ce1" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:PATConnectio nString %>"
SelectCommand=" ww_nested" SelectCommandTy pe="storedproce dure">
<SelectParamete rs>
<asp:ControlPar ameter ControlID="t1" Name="van" Type="string" />
<asp:ControlPar ameter ControlID="t2" Name="tcon" Type="string" />
<asp:ControlPar ameter ControlID="t3" Name="carr" Type="string" />
</SelectParameter s>
</asp:SqlDataSour ce>

<asp:GridView ID="GridView2" runat="server" AutoGenerateCol umns="False"
DataSourceID="s qldatasource1" DataKeyNames="U ID" AllowPaging="fa lse"
AllowSorting="f alse">
<Columns>
<asp:BoundFie ld DataField="UID" HeaderText="UID " ReadOnly="True"
Visible="false"/>
<asp:BoundFie ld DataField="EVEN T_DESCRIPTION" HeaderText="Eve nt
Description" />
<asp:BoundFie ld DataField="Even t" HeaderText="Eve nt" />
<asp:BoundFie ld DataField="Even tDt" HeaderText="Eve ntDt" />
<asp:BoundFie ld DataField="Even tLocation" HeaderText="Loc ation" />
<asp:BoundFie ld DataField="Ship Name" HeaderText="Shi p Name" />
</Columns>
</asp:GridView>

</ItemTemplate>
</asp:TemplateFie ld>

Jun 16 '06 #1
1 1944
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
2261
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 typedef unsigned long int uint32; /* 32 bits */ // Up to 36 request flags, so this will take up to 3
3
8489
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 = files.end(); for (b; b!=e b++) std::cout << '\t' << *b << std::endl;
0
2785
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 "master" table is like this: A1
0
1247
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 on one domain I don't use so no harm will be done in testing time). and that is working. than I tried to write mod_rewite rule in .htaccess which...
1
4216
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. This value is used by a a detail gridview nested within the master. This works well but when I hide the customerid the filter stops working. I...
0
1107
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 formatting. I need to display the data on separate lines and columns. I had it in tables and aligned correctly, but now that I am nesting the...
3
18776
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 nested gridviews?
2
1824
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 for gridview B's select method. This is where my problem lies....because both gridview's are contained in there respective user controls, when i...
0
1544
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: http://img17.imageshack.us/img17/7442/nestedgridview1.jpg I could already display the gridview but the problem is storing the data. All the gridviews (parent and children)...
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7438
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.