Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 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 July 13th, 2004, 02:26 PM
Registered User
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default One Row in DataGrid error

I'm getting the following error:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: value

The table that I am pulling from is only returning one record when I get the error. If I add a second item to the table, everything behaves as it should. Is there something quirky with how the DataGrid distinguishes between AlternatingItem and Item when there is only one record. Has anyone seen this before?

Thanks in advance for any suggestions...I've tried everything I can think of!


 
Old July 14th, 2004, 02:33 AM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you tryed >>ExecuteReader or ExecuteNonQuery<<?
Because the ExecuteScalar returns one row from table.

 
Old July 14th, 2004, 05:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Could this be a paging error? Are you somehow on a different page that this is giving you an error?

Can you post any relevant code?

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar in row of Datagrid Except Header Row Theone84 ASP.NET 2.0 Professional 0 August 11th, 2008 12:10 AM
Fixed row in datagrid JCP General .NET 1 January 13th, 2005 05:56 PM
Getting value of filtered datagrid row ashley_y VB How-To 1 November 23rd, 2004 10:48 AM
Manage data row by row in datagrid Dragonist Classic ASP Databases 5 July 29th, 2004 04:17 AM





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