Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old November 16th, 2007, 03:17 AM
Authorized User
 
Join Date: Dec 2005
Location: Lucknow, UP, India.
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surendraparashar
Default Nested Gridview Event Problem

Hi All,

I want to handle events of nested grid view. I want to handle RowCommand, RowDataBound Events of a nested grid view. Also I want to validate nested grid view Items with javascript.

Following is the html code for nested gridview:

<asp:GridView ID="gvBuying" runat ="server" AutoGenerateColumns="False" Width="100%" HorizontalAlign="Center" OnRowDataBound="gvBuying_RowDataBound" OnPageIndexChanging="gvBuying_PageIndexChanging" PageSize="3" OnRowEditing="gvBuying_RowEditing" OnRowCancelingEdit="gvBuying_RowCancelingEdit" OnRowCommand="gvBuying_RowCommand" >

            <RowStyle HorizontalAlign ="Center" />
            <AlternatingRowStyle BackColor ="#EFEFEF" />
            <Columns>
            <asp:BoundField DataField ="RowNum" HeaderText ="S.No." ReadOnly ="true" />

            <asp:BoundField DataField ="REGNNO" HeaderText ="Regn No." ReadOnly ="true" >
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField ="SubModel" HeaderText ="SubModel" ReadOnly ="true" />

            <asp:BoundField DataField ="EVALUATEDDATE" HeaderText ="Evaluated Date" DataFormatString ="{0:dd-MMM-yy}" HtmlEncode ="False" />
            <asp:TemplateField HeaderText ="Direct Buying Status" HeaderStyle-Width ="25" >
                <ItemTemplate >
                    <asp:LinkButton ID="lnkdirect" runat="server" Text="No">
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
<asp:GridView Visible="false" ID="gvdirect" runat="server" AutoGenerateColumns ="false" ShowHeader ="false" >
                    <Columns >
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="lbl" runat="server" Text =<%#Eval("lbl") %> ></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField >
                        <ItemTemplate >
                            <asp:TextBox ID="txt" runat ="server">
                            </asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                    </Columns>
                    </asp:GridView>

                </ItemTemplate>
            </asp:TemplateField>

            </Columns>
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" BackColor="#006699" ForeColor="White" />
            </asp:GridView>

Surendra Parashar
Gurgaon,
http://www.geocities.com/surendraparashar
__________________
Surendra Parashar
Gurgaon,
http://www.geocities.com/surendraparashar


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tie to nested GridView inside DataList rsearing ASP.NET 2.0 Basics 6 June 18th, 2011 06:35 AM
Add LinkButton To Nested GridView Dynamcially rsearing ASP.NET 2.0 Professional 1 January 3rd, 2008 10:19 AM
Fire Events from Nested GridView adamh409 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 November 5th, 2007 01:18 PM
GridView SelectedIndexChanged event bnorg ASP.NET 2.0 Professional 1 July 7th, 2007 01:14 AM
Event Handling in Nested Grids bala24 General .NET 0 May 12th, 2006 02:51 AM





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