• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Status
Not open for further replies.
Where do you think I originally got the code? The problem is that we have to do it in a very different way then the common examples do it so i end up lost and confused especially when they code in C# which ASP doesn't allow for.

Currently my problem is that I can delete a single row, but when I try to delete multiple rows it says "row 2 does not exist".
 
By the way, Ego, "Aren't you capable of X" is precisely the sort of rude behaviour I object to in the game thread. There is a polite way of asking "Why don't you use language X?", which would be "How about language X, it has these features", and there is a rude way, which is to imply "You're too stupid to use language X, but I'm going to suggest it anyway." As you just did. Consider the difference, and learn how to post politely in the game thread.

I dont have to learn how to post - but you do have to learn how to read. I just asked if you didnt know how to work with VB because it is far easier - and in fact if you know how to work with VB you will know that VB is damned easy to work with. Far easier then C++. If you are in Paris, why do you have to pass to africa to reach Russia?

If you cant handle a question like that, then its not my problem. If you really believe i am not being polite, and since forum rules do not accept that, you are free to PM a moderator asking him to check my post, and warn me in the process if i pass the limit. But i am fairly sure you know no harm will be done to me since i just made a basic question.
 
Now, I've not looked at your code other than glanced at it, but purely (so it may not be relevant) from what you've just said...sometimes, but not always, things count from 0 not 1...

Have fun
Finn
 
dude I have a datagrid.

Say I have 3 rows of data.

Pr_code Name Cost Qty
4 HALO3 79 42
4 HALO3 79 42
4 HALO3 79 42

The code I have is a for loop that if a chkbox in one of the rows (eac row has a chkbox on the far left) is checked then delete the row from the datatable, refresh the datatable, gridview.databind() reloop and check the next row.

Say I want to delete rows 2 and 3.

It deletes row 2.

when it checks for the next row to delete it says it cannot find the next row.

My ability to debug has been severly cutback as im stuck on vista machines most of the time and their version of visual studios is crippled.
 
Sid Meier said:
and you al kept ignoring that you help is absolutely of no help to me

We didn't, actually. That you have got yourself into a position where the help it is possible to give over an Internet forum doesn't help you pass your exam - well, that's your problem and not ours. What we were doing were giving you some long-term strategies for ensuring this doesn't happen again. That's extremely helpful, or anyway it would be if you hadn't gotten yourself locked into hysterical resistance to any post that isn't "Do X, Y, and Z".

"watching the variables" didn't help either because I do not know what to look for

Well, yes, that's the problem right there. Alas, knowledge of how your own program works is not something we can magically download into your head. But to make one more attempt, you are not looking for anything in particular, you are looking for what is actually there, and comparing to what you think should be there. If you don't have a model of what should be there, then you have no business getting code off the net in the first place; write your own and you won't have this sort of problem.

and the program says that the variables are correct but it still gives that error,

This is a contradiction in terms. Variables that give an error are by definition not correct. What you probably mean is "I don't see a problem with the reported variables", which is, again, back to the basic problem with code you didn't write yourself.

the help documentation didn't help either because I have no idea based on the debug what the crap is happening

See above.

and the constant dogpiling OVER ONE STUPID LINE OF CODE

One line of code which is, apparently, going to make you fail your exam. Not so stupid as all that, perhaps. Further, nobody dogpiled you over the code, you were dogpiled over your attitude.

impractical and frankly STUPID when I'm merely a week away from exams in multiple course about something that for all intents and purposes is beyond the scope of the course itself.

If it's on the exam, then by definition it's not beyond the scope of the course. Perhaps you should rethink who is being stupid about this situation. Anyway, a week is oceans of time where exam cramming is concerned. Me, I don't get worried until the day before. Why, you've got four perfectly good hours this Saturday that you could devote to studying.


I think perhaps you will just have to eat a bad grade for this exam, realise that there is very basic stuff you do not know, and go back and learn it. Happens to the best of us, including me, with that dang math course my first year at college. But at any rate no amount of hysterical forum posting is going to pass this exam for you. I suggest you take a deep breath and work on some other problem for an hour or so. How about the problem of moving out from your parents' house, how are you getting on with that? That could well be a lot more important for your life than any single grade.
 
Sid Meier said:
dude I have a datagrid.

Say I have 3 rows of data.

Pr_code Name Cost Qty
4 HALO3 79 42
4 HALO3 79 42
4 HALO3 79 42

The code I have is a for loop that if a chkbox in one of the rows (eac row has a chkbox on the far left) is checked then delete the row from the datatable, refresh the datatable, gridview.databind() reloop and check the next row.

Say I want to delete rows 2 and 3.

It deletes row 2.

when it checks for the next row to delete it says it cannot find the next row.

Oh, is that all? No wonder you're having trouble, you're trying to apply Fortran indexing to a C problem. If you'd been this specific about the problem before, I'd have been able to help you a long while ago. (Which incidentally shows the importance of asking questions in the right way; "It doesn't work" is totally unhelpful.)

Anyway, to get back to your problem; given three rows, the first row is row 0, the second row is row 1, the third row is row 2. So, deleting row 2 deletes the last row, and then there aren't any more rows beyond that. Let me expand your table a bit:

Code:
Pr_code  Name   Cost Qty         Fortran-index            C-index
4            HALO3   79   42            1                    0
4            HALO3   79   42            2                    1
4            HALO3   79   42            3                    2

You want to use the C, not Fortran, index. I'll throw in another piece of advice for free: Make your rows different, like this:

Code:
Pr_code  Name   Cost Qty            Fortran-index          C-index
4            HALO3   79   42            1                    0
4            HALO2   40   38            2                    1
4            HALO1   10   2             3                    2

If you had done this, you'd have been able to see which row was being deleted, and debugged a lot faster.





As for you, Ego, as you must know there is a difference between being rude, and being so rude that a moderator needs to step in. I am giving you fair warning, however, that this does not apply in our game; I will step in even for small rudenesses.

Apart from that, though, I would ask that you consider this. I am not saying this just to pick on you, or just because I'm the GM and can do it, or just because I'm evil and twisted. I am saying it because I genuinely do believe that your posts are making an atmosphere of confrontation in our game, that native speakers of English really are insulted by what you post even when it doesn't look offensive to you, and that there is a danger of some people (including me!) quitting over your attitude. This is not a question of your taste versus my taste. This is roughly 50% of the players who have trouble having fun because of you.

As for your "I just asked X", it won't wash. You quite simply aren't a native speaker of English, and you need to realise that it is quite possible to insult people even when the dictionary, or the literal Portuguese translation, looks totally ok. I agree that in the literal sense you asked "Why can't you use VB", but as a matter of fact, your words mean "Are you so stupid you can't use VB?"

Please believe that I am not saying this sort of thing just to have a flamewar with you. I'm saying it because you actually are spoiling the game for a lot of people, probably without meaning it, and I think it's possible for you to stop. Also because, if you don't stop, you will be banned from our game. It really will happen, Ego. No amount of saying "If you can't take this, go elsewhere" is going to help, because

a) Lurken and Sterk agree with me, and we have the power in this game
b) Several other players have made similar complaints.

I don't like to make threats, but these are the facts on the ground. You can dislike them; you can say it shouldn't be that way. But the facts remain, and if you don't adapt and play the game our way, then we simply won't play with you.

I know you are going to say I'm only threatening this because I'm afraid of Leon. I can't prove otherwise, to be sure - except that if you drop or are banned, another player will take up Leon. Probably MangoMan, since he was first in the queue. But consider: Even if I'm only afraid of Leon and looking for an excuse, you are in fact giving me the excuse I need. Do you really want to give me that satisfaction? You must know that if I were to ban you on grounds that most of the players found ridiculous, the game would collapse. So, even on the assumption that I'm an evil bastard who would use GM powers for ingame purposes, I still need a reason. Don't give me that reason. Please.
 
My rows were different, and my code can successfully delete one row at a time. I'll set it up on my laptop and see if I can see the actual rows in the dt.

btw how does one look at Java code for the partial converter I sent you?
 
Status
Not open for further replies.