Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
OriginalGriff14-Aug-10 2:01
mveOriginalGriff14-Aug-10 2:01 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
yum 201014-Aug-10 7:45
yum 201014-Aug-10 7:45 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
yum 201014-Aug-10 7:49
yum 201014-Aug-10 7:49 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
OriginalGriff14-Aug-10 8:49
mveOriginalGriff14-Aug-10 8:49 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
Luc Pattyn14-Aug-10 9:05
sitebuilderLuc Pattyn14-Aug-10 9:05 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
OriginalGriff14-Aug-10 9:24
mveOriginalGriff14-Aug-10 9:24 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
Luc Pattyn14-Aug-10 9:27
sitebuilderLuc Pattyn14-Aug-10 9:27 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
OriginalGriff14-Aug-10 9:35
mveOriginalGriff14-Aug-10 9:35 
GeneralRe: sever is not displaying the content that " you have left the chat room".... Pin
yum 201015-Aug-10 8:11
yum 201015-Aug-10 8:11 
QuestionGet cell value from GridView Pin
treuveni13-Aug-10 12:45
treuveni13-Aug-10 12:45 
AnswerRe: Get cell value from GridView Pin
PIEBALDconsult13-Aug-10 17:55
mvePIEBALDconsult13-Aug-10 17:55 
GeneralRe: Get cell value from GridView Pin
treuveni13-Aug-10 21:03
treuveni13-Aug-10 21:03 
AnswerRe: Get cell value from GridView Pin
maddahi.m.p14-Aug-10 0:29
maddahi.m.p14-Aug-10 0:29 
QuestionMessage Removed Pin
13-Aug-10 11:53
Tichaona J13-Aug-10 11:53 
AnswerRe: Playing a list of files on after the other. Pin
AspDotNetDev13-Aug-10 12:22
protectorAspDotNetDev13-Aug-10 12:22 
QuestionHow to properly show text for URL link using RichTextBox to output into RTF format? Pin
jboyd11113-Aug-10 10:53
jboyd11113-Aug-10 10:53 
QuestiondataGridView1_CellContentClick Error Index Out of Range Pin
MumbleB13-Aug-10 10:27
MumbleB13-Aug-10 10:27 
AnswerRe: dataGridView1_CellContentClick Error Index Out of Range Pin
OriginalGriff13-Aug-10 10:39
mveOriginalGriff13-Aug-10 10:39 
GeneralRe: dataGridView1_CellContentClick Error Index Out of Range Pin
MumbleB13-Aug-10 11:02
MumbleB13-Aug-10 11:02 
GeneralRe: dataGridView1_CellContentClick Error Index Out of Range Pin
MumbleB13-Aug-10 11:18
MumbleB13-Aug-10 11:18 
GeneralRe: dataGridView1_CellContentClick Error Index Out of Range Pin
OriginalGriff13-Aug-10 22:59
mveOriginalGriff13-Aug-10 22:59 
Kwagga wrote:
I have also re-writtent the currentRow as this which seems to work:
int currentRow = e.RowIndex;


Yes, that is what I would expect - and int assigned directly to an int! See how much easier it is when you don't convert int to string to int? Laugh | :laugh:

Kwagga wrote:
The error seems to come in here:
string taskstring = dataGridView1[0, currentRow].Value.ToString();


That only leaves one option: currentRow has a value that is either negative, or too big for the DataGridView. Since you access it from the RowIndex, it is unlikely to be too big - how would it unless the DatatGridView is being modified by some outside agency; not too likley in your scenario I think.

That leaves negative. And I'm betting that is what the problem is. The easiest way to get a negative number here via the RowIndex (in fact the only one I know, but I've been wrong before) is to click on the column header. Are you by any chance doing that?

If not, then insert a check for negative (and out-of-range) values and see what you get.

I'm pretty confident that either your code for the other DataGridViews is different and checks for valid data or you haven't clicked on their column header yet... Big Grin | :-D
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

GeneralRe: dataGridView1_CellContentClick Error Index Out of Range Pin
MumbleB14-Aug-10 3:41
MumbleB14-Aug-10 3:41 
AnswerRe: dataGridView1_CellContentClick Error Index Out of Range Pin
Luc Pattyn13-Aug-10 14:00
sitebuilderLuc Pattyn13-Aug-10 14:00 
GeneralRe: dataGridView1_CellContentClick Error Index Out of Range Pin
MumbleB13-Aug-10 21:50
MumbleB13-Aug-10 21:50 
GeneralRe: dataGridView1_CellContentClick Error Index Out of Range Pin
Luc Pattyn13-Aug-10 22:34
sitebuilderLuc Pattyn13-Aug-10 22:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.