Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
G

Grollub

@Grollub
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DataGridView Access Problem [modified]
    G Grollub

    Thanks very much for the reply. 1.) I agree whole-heartedly. Excel is not a database, I am just trying to get something up and running while I learn MySQL and implement. The spreadsheet is already in place, and I had hoped to get something quick and dirty up and running for those who utilize it... and then come back later and move the program to SQL. (under a time crunch). 2.) In this case, I have a dataset.. should I just move through the dataset itself (make this a public variable?) and just use the DataGridView to display the data? 3.) I checked this... and I set the value right above this... I have checked it using a breakpoint and the index I provide is valid... its just the datagridView that seems to 'lose' rows. Could this be a private vs. public variable issue?

    Database csharp database help visual-studio data-structures

  • DataGridView Access Problem [modified]
    G Grollub

    Hello, I have been working with VB ADO for some time using Visual Studio 2003 and created several applications connecting to Excel with ADO. However, I have moved to Visual Studio 2008 now and have run into some trouble with the new DatagridView in the latest .NET version. Let me step through the process. Upon 'Form_Load', I connect to my database, fill the dataset, bind it to my DataGridView in a different Form named, which is publicly defined and created upon startup. I utilize the DataGridView values to populate several text boxes and richtextboxes based upon the data. This is all working great. The problem came when I tried to create other controls to manipulate this datagridView. The lines I am using to access this are: Form2.DataGridView1.Item("ColumnName", CurrentRecordRow).Value() Whenever I try this same line of code through a different subroutine (a button click for example) I get an index out of array error. Through some troubleshooting, I have managed to discover that the 'RowCount' property of the DataGridView changes to '0' when outside the Form_load subroutine where I populate the DataGridView from the created dataset. (in the FormLoad, the rowcount is 236, when I click a button that shoots a messagebox with the Rowcount again, it says its 0) This explains the 'index' fatal error generated, but not why the data seems suddenly 'gone' once the form has loaded? Can anyone make a recommendation of what I may be doing wrong in accessing the data within this DataGridView? thanks, Grollub

    modified on Thursday, October 8, 2009 3:35 PM

    Database csharp database help visual-studio data-structures
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups