473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

No row can be added to a DataGridView control that does not have columns.

29
I have a DataGridView in my application. When I logged in, the records will be displayed in the grid. It works fine. But when I logged out and logged in again, this arror appears, "No row can be added to a DataGridView control that does not have columns. Columns must be added first.". How could that be happen while I created / added 4 columns manually when I created the DataGridView in my GUI?
May 26 '10 #1
1 10257
nukefusion
221 Expert 100+
Hi mylixes,

It's difficult to tell without any code sample but somehow either the columns aren't being added, or they're being removed before the rows are added.

If you're adding columns manually, make sure AutoGenerateColumns is set to false.

If you still experience problems, try posting a small code sample that may help us to diagnose the issue.
May 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: dm1608 | last post by:
Hello, I have a DataGridView control in VB.NET 2005 that I would like to iterate thru row by row and parse out the individual columns into variables. Can someone provide me example code or direct...
0
by: Job Lot | last post by:
My DataGridView control is bound to a DataTable. Columns and rows are added dynamically to the DataTable at run tine. I am setting Caption property of DataColumn to show descriptive names of the...
2
by: Ye Li | last post by:
I have two windows with datagridview control type in one form. I want to move multiple rows from one datagridview to another datagridview. My code is as follows: private void...
1
by: manjub | last post by:
Hi, I was working on an MDI application using Visual C++ 2005 .NET. In a child window, I have an instance of DataGridView control. If I open several child windows, they all work fine. ...
1
by: Rich | last post by:
Hello, I am reading data from a sql server table that is under replication. This table has the replicatin GUID column that is generated with replicatin. I am reading the data from a...
0
by: RickH | last post by:
Has anyone tried wrapping the DataGridView control itself as a custom Cell/Column control. So that I can have a child DataGridView appear in a column of a parent DataGridView so that the...
0
by: Dwight Johnson | last post by:
I am using the DataGridView control for the first time. It took me WAY TOO LONG to figure out how to position the columns in the grid the way I wanted them, but I suspect there may still be a...
1
by: keshari1sangram | last post by:
I am developing a dynamic DataGridView control in which i provide no.of rows and columns to generate the datagridview upto this is fine. But all the columns are of type DataGridViewTextBoxColumn...
0
by: vblin | last post by:
hi, im using visual basic can anyone tell me if it is possible to use the datagridview control as you would the MSflexgrid? I'm trying to use the datagridview control to make a column to display a...
1
by: siri11 | last post by:
Hi all.. How to refresh a datagridview control in c#.net so that,the grid becomes empty with empty rows and columns.And if incase any background color is applied to any of the grid row or column...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.