Deleting Rows and Columns in DataGridView
-
Just spent a good 5 minutes trying to figure out what the heck is wrong with my program's logic. I have a symmetric matrix that I'm deleting rows and columns of (same index) in a certain order. All's well except the last one. When you delete the last row or column (deleting the matrix), it sort of deletes the remaining column or row. D'oh!
-
Just spent a good 5 minutes trying to figure out what the heck is wrong with my program's logic. I have a symmetric matrix that I'm deleting rows and columns of (same index) in a certain order. All's well except the last one. When you delete the last row or column (deleting the matrix), it sort of deletes the remaining column or row. D'oh!
Is this a built-in class? Third-party? Something you created? :confused: P.S. And did you fix it?
modified on Wednesday, October 29, 2008 4:51 PM
-
Just spent a good 5 minutes trying to figure out what the heck is wrong with my program's logic. I have a symmetric matrix that I'm deleting rows and columns of (same index) in a certain order. All's well except the last one. When you delete the last row or column (deleting the matrix), it sort of deletes the remaining column or row. D'oh!
How did you fix it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Is this a built-in class? Third-party? Something you created? :confused: P.S. And did you fix it?
modified on Wednesday, October 29, 2008 4:51 PM
This is the DataGridView (see subject). It's been a while since I used grids and I wasn't too familiar with this one. Problem solved though.
-
How did you fix it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
Just have to make sure to delete only one direction if it's the last one, since you're basically deleting the matrix. That's annoying though.
-
Just spent a good 5 minutes trying to figure out what the heck is wrong with my program's logic. I have a symmetric matrix that I'm deleting rows and columns of (same index) in a certain order. All's well except the last one. When you delete the last row or column (deleting the matrix), it sort of deletes the remaining column or row. D'oh!
5...minutes? Seriously, most of us brood an hour or two over or programs before we see what's wrong. 5 minutes is not worth mentioning.
-
Just spent a good 5 minutes trying to figure out what the heck is wrong with my program's logic. I have a symmetric matrix that I'm deleting rows and columns of (same index) in a certain order. All's well except the last one. When you delete the last row or column (deleting the matrix), it sort of deletes the remaining column or row. D'oh!
5...minutes? Seriously, most of us brood an hour or two over or programs before we see what'as wrong. 5 minutes is not worth mentioning.