Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > "codeless" nested gridviews...there has to be a better way

Thread Tools

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

Posts: n/a
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.

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.



<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="<%$ ConnectionStringsATConnectionString %>"
SelectCommand="ww_nested" SelectCommandType="storedprocedure">
<asp:ControlParameter ControlID="t1" Name="van" Type="string" />
<asp:ControlParameter ControlID="t2" Name="tcon" Type="string" />
<asp:ControlParameter ControlID="t3" Name="carr" Type="string" />

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
DataSourceID="sqldatasource1" DataKeyNames="UID" AllowPaging="false"
<asp:BoundField DataField="UID" HeaderText="UID" ReadOnly="True"
<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" />


Reply With Quote
Posts: n/a
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!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
there has got to be a better way... Michael Barinek Ruby 6 07-26-2006 06:21 AM
There has to be a better way to develop web applications. Rob R. Ainscough ASP .Net 42 08-04-2005 01:48 AM
Build a Better Blair (like Build a Better Bush, only better) Kenny Computer Support 0 05-06-2005 04:50 AM
Converting SQL Server "bit" field to a CLR boolean-- has to be a better way Jim Bancroft ASP .Net Datagrid Control 1 02-09-2005 07:21 AM
Nested DIVs - is there a better way? Guadala Harry ASP .Net 2 10-26-2004 07:30 PM