Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 November 3rd, 2005, 01:56 PM
Registered User
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default validation of one cell of a Data Grid to another

I have two cells one is a radiobtnlist with 3 items pass, fail, NA
values of 1, 2, 3

i need to verify that if fail(2) is clicked that another cel text box txtcomm has some data (len > 0)
I keep getting an error that object not set to an instance

here is my code

Public Function chkPFNA_COMM()

        Dim mystring As String
        Dim i As Integer = 0
        Dim x As TextBox
        Dim dgi As DataGridItem

        For Each dgi In dgPrep.Items
            Dim id As Integer = Convert.ToInt32(dgPrep.DataKeys(dgi.ItemIndex))
            Dim txtR_C As String = CType(dgi.FindControl("r_c"), TextBox).Text
            Dim txtPFNA As String = CType(dgi.FindControl("btnPFNA"), RadioButtonList).SelectedValue
            Dim txtCorr As String = CType(dgi.FindControl("chkcorr"), CheckBox).Checked

            If txtPFNA = "2" Then
                errPFNA.Text = "must supply failure"
                chkPFNA_COMM = False
                Exit Function
            End If

    End Function

Old November 5th, 2005, 01:53 AM
Friend of Wrox
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts

What line is the error on?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving Data Grid Cell Value Using Javascript dotnetsathya ASP.NET 1.0 and 1.1 Basics 0 October 23rd, 2008 02:00 AM
how data grid of vb.net add cell color Nuwang Forum and Wrox.com Feedback 0 September 10th, 2008 08:36 PM
In-Cell Drop Down Via Data Validation Coby Excel VBA 1 October 16th, 2007 04:13 PM
How to Get Specific Cell Value of Data Grid in C# akumarp2p C# 1 February 1st, 2007 08:17 AM
Field Validation in an Editable Data Grid Shadane ASP.NET 1.0 and 1.1 Basics 3 October 2nd, 2006 09:02 AM

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