Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 21st, 2007, 03:15 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default bulleted list in grid view

how is possible to give bulleted list points in one of column in grid view.


thanks......
__________________
thanks......
Reply With Quote
  #2 (permalink)  
Old December 21st, 2007, 10:00 AM
Authorized User
 
Join Date: Sep 2007
Location: , , Finland.
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

TemplateField is your friend. Add new TemplateItem to grid's columns. Then add asp:Repeater inside ItemTemplate. Like this:

Code:
        <asp:GridView runat="server" DataSourceID="ObjectDataSource1">
            <Columns>
                <asp:BoundField DataField="ID" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Repeater runat="Server" DataSourceID="ObjectDataSource2">
                            <HeaderTemplate>
                                [list]
                            </HeaderTemplate>
                            <ItemTemplate>
                                <li><%# Eval("Name") %></li>
                            </ItemTemplate>
                            <FooterTemplate>
                                </ul>
                            </FooterTemplate>
                        </asp:Repeater>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
Works like a charm :)

Reply With Quote
  #3 (permalink)  
Old December 24th, 2007, 04:26 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

i feel i am confused a bit i used yours coding and modify it as below:

 <asp:GridView ID="GridView1" runat="server" DataKeyNames="MemberID" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
            <Columns>
             <asp:TemplateField HeaderText="MemberID">
               <ItemTemplate>
                <asp:Label ID="lblMemberID" runat="server" Text=<%# Eval("MemberID") %>></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Repeater ID="Repeater1" runat="Server" DataSourceID="SqlDataSource2">
                            <HeaderTemplate>
                                [list]
                            </HeaderTemplate>
                            <ItemTemplate>

                                <li><%# Eval("BroadCastID")%></li>

                            </ItemTemplate>
                            <FooterTemplate>
                                </ul>
                            </FooterTemplate>
                        </asp:Repeater>
                    </ItemTemplate>
                </asp:TemplateField>
                     </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
            SelectCommand="SELECT * FROM [BroadCastDetails] WHERE ([BroadCastID] = @BroadCastID)">
            <SelectParameters>
                <asp:FormParameter FormField="lblMemberID" Name="BroadCastID2" Type="Int64" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>"
            SelectCommand="SELECT * FROM [BroadCastDetails]">
        </asp:SqlDataSource>

See here i want all broadcastID's for respective Memberid
i.e
MemberID BroadcastID
 1 1
          2
          3
 2 1
          2
          3 (ofcource these with bulleted list)

Please suggest.




thanks......
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid view roopeshmkatlive.in ASP.NET 1.0 and 1.1 Professional 1 August 1st, 2008 01:03 PM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 06:25 PM
grid view MunishBhatia ASP.NET 2.0 Professional 1 May 25th, 2007 07:26 AM
populate details view or list view non empty rows iinfoque ASP.NET 2.0 Basics 0 March 11th, 2007 06:11 AM
having some fields of a grid view a drop list dsblack@montgomerycountyt ASP.NET 2.0 Professional 0 June 2nd, 2006 04:18 PM



All times are GMT -4. The time now is 10:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.