Click here to Skip to main content
16,010,351 members
Home / Discussions / C#
   

C#

 
AnswerRe: Remoting with XMLSerializable objects Pin
mud779-Jun-10 9:43
mud779-Jun-10 9:43 
QuestionError casting delegate in non-generic class Pin
Kalvin @ Work9-Jun-10 4:19
Kalvin @ Work9-Jun-10 4:19 
AnswerRe: Error casting delegate in non-generic class [modified] Pin
Dimitri Witkowski9-Jun-10 8:05
Dimitri Witkowski9-Jun-10 8:05 
QuestionLogin dialog on Page loads Pin
Ramkithepower9-Jun-10 3:59
Ramkithepower9-Jun-10 3:59 
QuestionC# datagridview cell focus Pin
jojoba20119-Jun-10 3:09
jojoba20119-Jun-10 3:09 
AnswerRe: C# datagridview cell focus Pin
Henry Minute9-Jun-10 7:17
Henry Minute9-Jun-10 7:17 
QuestionRe: C# datagridview cell focus Pin
jojoba20119-Jun-10 7:48
jojoba20119-Jun-10 7:48 
AnswerRe: C# datagridview cell focus Pin
Henry Minute9-Jun-10 12:57
Henry Minute9-Jun-10 12:57 
I have been looking at your problem since I got your message. I now understand what you require but unfortunately I cannot find a way to do it.

d@nish was quite right in saying that all you have to do is set CurrentCell to the value you want. Just put a Button on your Form and in its' Click event handler put the following:
C#
private void button1_Click(object sender, EventArgs e)
{
    dataGridView1.CurrentCell = dataGridView1[3, 0];
}


and regardless of where you select in the DGV, each time you click the button the [3, 0] cell is selected. No problem.

The problem is in finding an event to handle where you can both check the values for the two cells (that bit is relatively easy) and also set the CurrentCell without throwing an exception (that is where the problems occur).

It is now time for my cocoa and bed but I will keep thinking about this and will get back to you if I find an answer.
Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.

AnswerRe: C# datagridview cell focus Pin
Henry Minute10-Jun-10 3:24
Henry Minute10-Jun-10 3:24 
AnswerRe: C# datagridview cell focus Pin
dan!sh 9-Jun-10 7:55
professional dan!sh 9-Jun-10 7:55 
QuestionRe: C# datagridview cell focus Pin
jojoba20119-Jun-10 8:27
jojoba20119-Jun-10 8:27 
GeneralRe: C# datagridview cell focus Pin
Henry Minute9-Jun-10 10:06
Henry Minute9-Jun-10 10:06 
AnswerRe: C# datagridview cell focus Pin
Dr.Walt Fair, PE9-Jun-10 10:46
professionalDr.Walt Fair, PE9-Jun-10 10:46 
GeneralRe: C# datagridview cell focus Pin
Henry Minute9-Jun-10 11:37
Henry Minute9-Jun-10 11:37 
GeneralRe: C# datagridview cell focus Pin
Dr.Walt Fair, PE9-Jun-10 13:36
professionalDr.Walt Fair, PE9-Jun-10 13:36 
QuestionC# how to keep datetimes independent of regional settings Pin
MayukhSen9-Jun-10 2:01
MayukhSen9-Jun-10 2:01 
AnswerRe: C# how to keep datetimes independent of regional settings Pin
DaveyM699-Jun-10 2:05
professionalDaveyM699-Jun-10 2:05 
AnswerRe: C# how to keep datetimes independent of regional settings Pin
OriginalGriff9-Jun-10 2:16
mveOriginalGriff9-Jun-10 2:16 
AnswerRe: C# how to keep datetimes independent of regional settings Pin
Pete O'Hanlon9-Jun-10 2:36
mvePete O'Hanlon9-Jun-10 2:36 
AnswerRe: C# how to keep datetimes independent of regional settings Pin
Luc Pattyn9-Jun-10 3:30
sitebuilderLuc Pattyn9-Jun-10 3:30 
GeneralRe: C# how to keep datetimes independent of regional settings Pin
MayukhSen9-Jun-10 23:48
MayukhSen9-Jun-10 23:48 
Questionhandle of parent window containing windowless content Pin
rakesh54549-Jun-10 1:33
rakesh54549-Jun-10 1:33 
QuestionBuild exe dynamically Pin
kasraa000980009-Jun-10 0:57
kasraa000980009-Jun-10 0:57 
AnswerRe: Build exe dynamically Pin
OriginalGriff9-Jun-10 1:01
mveOriginalGriff9-Jun-10 1:01 
AnswerRe: Build exe dynamically Pin
datenkabel9-Jun-10 1:51
datenkabel9-Jun-10 1:51 

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.