Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2007, 01:49 AM
Authorized User
 
Join Date: May 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default GridView & Chechbox

Hello to All
please solve my problen

i am using GridView and i need to put Chechbox in it.

How can i do it?:(

Thanks


 
Old May 27th, 2007, 02:08 AM
Authorized User
 
Join Date: Nov 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Simply click the smart tag of grigview and select item template then drag the check box control to that blank place.
 
Old May 27th, 2007, 02:11 AM
Authorized User
 
Join Date: May 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks BUT
i need this check box to every row in the grid view???

 
Old May 27th, 2007, 08:48 PM
Friend of Wrox
 
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dragging the checkbox into the template field will add the checkbox to every row in the GridView.

The following is a Gridview with one column, which uses a template field and has only a checkbox in it bound to my data source:

Code:
<asp:GridView ID="GridView1" runat="server"
                AutoGenerateColumns="false" 
                DataSourceID="SqlDataSource3"
                EnableViewState="false">
                <Columns>
                   <asp:TemplateField HeaderText="ND">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkBxNoData" runat="server"
                                Checked='<%# Eval("noData") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
</asp:GridView>





Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView OnRowDataBound & Page.EnableViewState pvasudevan ASP.NET 2.0 Professional 0 November 20th, 2008 02:13 PM
VB: GridView & DetailsView in Master-Child Rich57 ASP.NET 2.0 Basics 1 May 29th, 2008 07:14 AM
VB GridView & DetailsView Rich57 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 1st, 2008 12:03 PM
Gridview & DetailsView Database Image Issue ayadrocks ASP.NET 2.0 Basics 1 December 27th, 2005 05:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.