Click here to Skip to main content
16,015,296 members
Home / Discussions / C#
   

C#

 
GeneralRe: Opening a CSV File Pin
Vikram A Punathambekar28-Oct-08 2:59
Vikram A Punathambekar28-Oct-08 2:59 
QuestionReading Specific Line Pin
Saiyed Alam27-Oct-08 21:32
Saiyed Alam27-Oct-08 21:32 
AnswerRe: Reading Specific Line Pin
Guffa27-Oct-08 21:39
Guffa27-Oct-08 21:39 
AnswerRe: Reading Specific Line Pin
Programm3r27-Oct-08 22:11
Programm3r27-Oct-08 22:11 
GeneralRe: Reading Specific Line Pin
Guffa28-Oct-08 2:21
Guffa28-Oct-08 2:21 
GeneralRe: Reading Specific Line Pin
Programm3r28-Oct-08 3:44
Programm3r28-Oct-08 3:44 
AnswerRe: Reading Specific Line Pin
PIEBALDconsult28-Oct-08 11:22
mvePIEBALDconsult28-Oct-08 11:22 
QuestionHow NOT to select a cell in DGV? Pin
User 543536427-Oct-08 19:17
User 543536427-Oct-08 19:17 
In my C# Application program, I have two DataGridViews which are not bound to any data source. I have coded them so that the user is allowed to drag and drop data between the two DGVs as well as within them.
So, when a data item in a cell is dragged and dropped on another cell, the data on the original is deleted - that is set to null.
The problem is, when I do that, after dropping, it automatically select the last cell (the one in which I just set the value to null).
How do I get that cell to be NOT selected?

Here is my code:


dgvSchedule.DoDragDrop(text, DragDropEffects.Copy); 
if (bDataDrop == true) 
{ 
           dgvSchedule.Rows[info.RowIndex].Cells[info.ColumnIndex].Value = null;         //setting the value to null 
           dgvSchedule.Rows[info.RowIndex].Cells[info.ColumnIndex].Selected = false;   //setting that cell to not selected 
           bDataDrop = false;                
} 



There, right after I set the value to null, I set the 'selected' property to false, but despite that it still selects that.

Please HELP!
AnswerRe: How NOT to select a cell in DGV? Pin
AhsanS27-Oct-08 20:52
AhsanS27-Oct-08 20:52 
GeneralRe: How NOT to select a cell in DGV? Pin
User 543536427-Oct-08 20:54
User 543536427-Oct-08 20:54 
QuestionFreehand drawing on WPF Pin
softwareengr27-Oct-08 19:14
softwareengr27-Oct-08 19:14 
AnswerRe: Freehand drawing on WPF Pin
leppie28-Oct-08 1:14
leppie28-Oct-08 1:14 
AnswerRe: Freehand drawing on WPF Pin
Pete O'Hanlon28-Oct-08 2:32
mvePete O'Hanlon28-Oct-08 2:32 
QuestionAutomating mpp using late binding Pin
DJ24527-Oct-08 18:27
DJ24527-Oct-08 18:27 
Questioncan not connect with .xls file Pin
HowIsIT27-Oct-08 17:47
HowIsIT27-Oct-08 17:47 
AnswerRe: can not connect with .xls file Pin
Parwej Ahamad27-Oct-08 18:23
professionalParwej Ahamad27-Oct-08 18:23 
GeneralRe: can not connect with .xls file Pin
HowIsIT27-Oct-08 23:12
HowIsIT27-Oct-08 23:12 
QuestionSimple screensaver crashing Pin
Data_Dragon27-Oct-08 14:00
Data_Dragon27-Oct-08 14:00 
Questionresources in solution Pin
nelsonpaixao27-Oct-08 13:10
nelsonpaixao27-Oct-08 13:10 
AnswerRe: resources in solution Pin
DaveyM6927-Oct-08 15:50
professionalDaveyM6927-Oct-08 15:50 
Questionthread abort exception when service ends to where it has been invoked from Pin
stephan_00727-Oct-08 13:04
stephan_00727-Oct-08 13:04 
AnswerRe: thread abort exception when service ends to where it has been invoked from Pin
Guffa27-Oct-08 15:48
Guffa27-Oct-08 15:48 
GeneralRe: thread abort exception when service ends to where it has been invoked from Pin
stephan_00727-Oct-08 23:29
stephan_00727-Oct-08 23:29 
QuestionSplitting up a list of things. Pin
Buckleyindahouse27-Oct-08 11:08
Buckleyindahouse27-Oct-08 11:08 
AnswerRe: Splitting up a list of things. Pin
Guffa27-Oct-08 11:19
Guffa27-Oct-08 11:19 

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.