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 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2006, 10:17 PM
Authorized User
 
Join Date: Aug 2006
Location: delhi, delhi, India.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to KamalRaturi Send a message via Yahoo to KamalRaturi
Default four Nested gridviews with data

hi ,

I use bound four Nested gridviews with data in .aspx page using template field. The Innermost grid rows do have IDs of products in hiddenfield value and a checkbox for each value,when user checks the selected checkboxes, and click the submit button I do not know how a string can be made with these IDs.

I tried at my level but.......

the code and Error is:

For Each gRow1 In GridView1.Rows
            If CType(gRow1.TemplateControl.FindControl("gridview2 "), GridView).HasControls Then
//err here// gdView = CType(gRow1.TemplateControl.FindControl("gridview2 "), GridView)
                MsgBox("G1")
                For Each gRow2 In gdView.Rows
                    If CType(gRow1.FindControl("gridview3"), GridView).HasAttributes Then
                        gdView = CType(gRow1.FindControl("gridview3"), GridView)
                        For Each gRow3 In gdView.Rows
                            If CType(gRow1.FindControl("gridview4"), GridView).HasAttributes Then
                                gdView = CType(gRow1.FindControl("gridview4"), GridView)
                                For Each gRow4 In gdView.Rows
                                    chkTitle = CType(gRow4.FindControl("ckSelect"), CheckBox)
                                    If chkTitle.Checked = True Then
                                        ifAnyChecked = True
                                        hdnValue = CType(gRow4.FindControl("hdnQuestionID"), HiddenField)
                                        If strID = "" Then
                                            strID = strID & hdnValue.Value
                                        Else
                                            strID = strID & "," & hdnValue.Value
                                        End If
                                    End If
                                Next
                            End If
                        Next
                    End If
                Next
            End If
        Next
        MsgBox(strID)



Error:Object reference not set to an instance of an object.


Please Tell me Solution if U know, Thanks in Advance.
 


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
Tab across gridviews cdw90nl Javascript How-To 1 February 4th, 2008 05:16 AM
Nested gridviews johncross912 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 November 23rd, 2007 03:04 AM
Gridviews lisabb ASP.NET 2.0 Basics 1 May 29th, 2007 11:40 AM
Divs, Gridviews and Javascript != fun mikeymikey ASP.NET 2.0 Professional 1 January 26th, 2007 02:10 PM
Best method - Nested data? bridie Classic ASP Databases 4 February 20th, 2004 12:46 PM



All times are GMT -4. The time now is 02:12 AM.


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