Click here to Skip to main content
15,921,454 members
Home / Discussions / C#
   

C#

 
GeneralRe: Intellisense Documenation Pin
OriginalGriff14-Jul-10 6:00
mveOriginalGriff14-Jul-10 6:00 
GeneralRe: Intellisense Documenation Pin
Luc Pattyn14-Jul-10 6:38
sitebuilderLuc Pattyn14-Jul-10 6:38 
GeneralRe: Intellisense Documenation Pin
OriginalGriff14-Jul-10 8:11
mveOriginalGriff14-Jul-10 8:11 
GeneralRe: Intellisense Documenation Pin
Wes Aday14-Jul-10 6:28
professionalWes Aday14-Jul-10 6:28 
GeneralRe: Intellisense Documenation Pin
programmervb.netc++14-Jul-10 5:26
programmervb.netc++14-Jul-10 5:26 
AnswerRe: Intellisense Documenation Pin
Ennis Ray Lynch, Jr.14-Jul-10 5:09
Ennis Ray Lynch, Jr.14-Jul-10 5:09 
QuestionGenerating C file using C# Pin
Niungareamit14-Jul-10 3:03
Niungareamit14-Jul-10 3:03 
AnswerRe: Generating C file using C# Pin
Eddy Vluggen14-Jul-10 3:12
professionalEddy Vluggen14-Jul-10 3:12 
GeneralRe: Generating C file using C# Pin
Niungareamit14-Jul-10 3:50
Niungareamit14-Jul-10 3:50 
GeneralRe: Generating C file using C# Pin
Eddy Vluggen14-Jul-10 4:03
professionalEddy Vluggen14-Jul-10 4:03 
AnswerRe: Generating C file using C# Pin
Peace ON14-Jul-10 3:22
Peace ON14-Jul-10 3:22 
AnswerRe: Generating C file using C# Pin
Richard MacCutchan14-Jul-10 5:58
mveRichard MacCutchan14-Jul-10 5:58 
AnswerRe: Generating C file using C# Pin
T M Gray14-Jul-10 7:23
T M Gray14-Jul-10 7:23 
AnswerRe: Generating C file using C# Pin
CPallini14-Jul-10 8:08
mveCPallini14-Jul-10 8:08 
GeneralRe: Generating C file using C# Pin
DaveyM6914-Jul-10 9:15
professionalDaveyM6914-Jul-10 9:15 
QuestionHow to disable selection in datagridview. Pin
NarVish14-Jul-10 2:59
NarVish14-Jul-10 2:59 
AnswerRe: How to disable selection in datagridview. Pin
Peace ON14-Jul-10 3:19
Peace ON14-Jul-10 3:19 
You have two choices for the same.

1. If you want to allow selection for certain rows and disable selection
for other rows then try following.

If SelectionMode is FullRowSelect, then you'll need to override SetSelectedRowCore for that DataGridView, and not call the base SetSelectedRowCore for rows you don't want selected.

If SelectionMode is not FullRowSelect, you'll want to additionally override SetSelectedCellCore (and not call the base SetSelectedCellCore for rows you don't want selected), as SetSelectedRowCore will only kick in if you click the row header and not an individual cell.


2. Try following.

C#
private  void dataGridView1_SelectionChanged(object sender, EventArgs e)
{
    if (this.dataGridView1.SelectedCells.Count > 0)
    {
        this.dataGridView1.SelectedCells[0].Selected = false;
    }
}



HTH
Jinal Desai - LIVE
Experience is mother of sage....

GeneralRe: How to disable selection in datagridview. Pin
NarVish14-Jul-10 3:26
NarVish14-Jul-10 3:26 
Questioncalling and displaying url in the same page. Pin
dabuskol14-Jul-10 1:53
dabuskol14-Jul-10 1:53 
AnswerRe: calling and displaying url in the same page. Pin
Peace ON14-Jul-10 1:59
Peace ON14-Jul-10 1:59 
AnswerRe: calling and displaying url in the same page. Pin
Prosanta Kundu online14-Jul-10 2:22
Prosanta Kundu online14-Jul-10 2:22 
GeneralRe: calling and displaying url in the same page. Pin
dabuskol19-Jul-10 0:37
dabuskol19-Jul-10 0:37 
Questionchange cell color of gird view on click event of CELL Pin
220814-Jul-10 1:14
220814-Jul-10 1:14 
AnswerRe: change cell color of gird view on click event of CELL Pin
Prosanta Kundu online14-Jul-10 1:31
Prosanta Kundu online14-Jul-10 1:31 
QuestionSerialport from a remote server Pin
grmihel214-Jul-10 0:18
grmihel214-Jul-10 0:18 

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.