Welcome to Dream.In.Code
Become a C# Expert!

Join 150,423 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,100 people online right now. Registration is fast and FREE... Join Now!




Strange problem with DataGridView control

 
Reply to this topicStart new topic

Strange problem with DataGridView control

cygnusX
18 Mar, 2008 - 09:43 AM
Post #1

D.I.C Head
**

Joined: 19 May, 2007
Posts: 159



Thanked: 2 times
My Contributions
I have DataGridView with 2 columns.The second column is DataGridViewButtonColumn.When i run my application there is some row in the DataGridView,which is absolutelly unneeded.The button in the second column(DataGridViewButtonColumn) has no text in it.I mean the button of this unneeded row.Every other row has text.If i add rows everything's ok,the problem is that this row is always positioned after the 'normal' rows which i'm adding.I did not add this row in the designer or in the code.It's just there by default.Is this a bug or something?How to remove it?
User is offlineProfile CardPM
+Quote Post

zakary
RE: Strange Problem With DataGridView Control
18 Mar, 2008 - 10:09 AM
Post #2

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 420



Thanked: 8 times
Dream Kudos: 175
My Contributions
That is there to allow the user to add more information to the dataGrid. if you set your dataGrid property "read only = true" that should fix your problem
User is offlineProfile CardPM
+Quote Post

cygnusX
RE: Strange Problem With DataGridView Control
18 Mar, 2008 - 11:15 AM
Post #3

D.I.C Head
**

Joined: 19 May, 2007
Posts: 159



Thanked: 2 times
My Contributions
Hm,i'm not sure whether you have understand my problem.Setting readonly to true doesn't help in my case.The row is in the DataGridView before starting application,i mean at the design time.Even if i clear the rows before the Form is showed,it has no effect just because there are no rows in the rows collection.But the row is visible and i don't know how to remove it.Thanks anyway.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Strange Problem With DataGridView Control
18 Mar, 2008 - 11:19 AM
Post #4

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 162 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
You can post the code you're using to populate your grid, along with the code for the grid itself. Without seeing how you're doing it we can never formulate a proper solution smile.gif
User is offlineProfile CardPM
+Quote Post

SpiderSpartan
RE: Strange Problem With DataGridView Control
18 Mar, 2008 - 11:54 AM
Post #5

D.I.C Head
Group Icon

Joined: 6 Feb, 2008
Posts: 68



Thanked: 3 times
Dream Kudos: 25
My Contributions
You might try just deleting the last row once you've loaded all the rows you're using. Just an idea
User is offlineProfile CardPM
+Quote Post

cygnusX
RE: Strange Problem With DataGridView Control
19 Mar, 2008 - 08:32 AM
Post #6

D.I.C Head
**

Joined: 19 May, 2007
Posts: 159



Thanked: 2 times
My Contributions
There is no last row,there are no rows at all in the DataGridView.Here is what i have...

screenshot
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 08:38PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month