Click here to Skip to main content
15,909,242 members
Home / Discussions / C#
   

C#

 
AnswerRe: passing parameters to a DLL function receiving pointer Pin
Colin Angus Mackay12-Dec-05 9:33
Colin Angus Mackay12-Dec-05 9:33 
AnswerRe: passing parameters to a DLL function receiving pointer Pin
Colin Angus Mackay12-Dec-05 9:35
Colin Angus Mackay12-Dec-05 9:35 
GeneralRe: passing parameters to a DLL function receiving pointer Pin
devinzhang12-Dec-05 9:58
devinzhang12-Dec-05 9:58 
AnswerRe: passing parameters to a DLL function receiving pointer Pin
Jared Parsons12-Dec-05 11:40
Jared Parsons12-Dec-05 11:40 
GeneralRe: passing parameters to a DLL function receiving pointer Pin
devinzhang12-Dec-05 12:08
devinzhang12-Dec-05 12:08 
QuestionSigning CodeDom assemblies Pin
cbadal12-Dec-05 8:00
cbadal12-Dec-05 8:00 
AnswerRe: Signing CodeDom assemblies Pin
cbadal14-Dec-05 7:08
cbadal14-Dec-05 7:08 
QuestionDatagrid ghost selection Pin
Glenn E. Lanier II12-Dec-05 6:29
Glenn E. Lanier II12-Dec-05 6:29 
I have a datagrid that I populate by:
<br />
OleDbConnection dbConnection = new OleDbConnection();  <br />
OleDbCommand tableCommand = null;<br />
OleDbDataReader reader = null;<br />
dbConnection.ConnectionString = sConnString;<br />
dbConnection.Open();<br />
tableCommand = dbConnection.CreateCommand();<br />
tableCommand.CommandText = sSQL;<br />
<br />
DataSet ds = new DataSet(); <br />
OracleDataAdapter adapter = new OracleDataAdapter(); <br />
adapter.SelectCommand = tableCommand;<br />
adapter.Fill(ds, "AllPatients"); <br />
dataGridPatients.SetDataBinding(ds, "AllPatients");	


This works fine. I alter sSQL based on selections made on a Windows form. However, when I execute this code a second (or third) time, the selected Datagrid cell retains its original value until I select the cell again.

Assuming the current datagrid row is:
1|Bob|Jones|

and Jones is selected, loading a dataset that contains 3|John|Smith|

results in

1|John|Jones|

being displayed. However, as soon as I select (manually) the Jones cell, Smith displays.

If I have several rows displayed origianally, and select a cell in a row greater than the number of rows displayed the next time, that cell remains in the datagrid.

What do I have to do to get the previously selected cell from retaining its selection? I have tried to unselect the row, to set current cell to something else, and to simulate a mousedown on the selected cell (which fires, but doesn't actually change the current visual cues).

Thanks,
Glenn
QuestionUDP port not receiving any data Pin
MullahOmer12-Dec-05 6:14
MullahOmer12-Dec-05 6:14 
AnswerRe: UDP port not receiving any data Pin
mcljava12-Dec-05 7:44
mcljava12-Dec-05 7:44 
QuestionThoughtpost P2P Pin
ShimiG12-Dec-05 6:07
ShimiG12-Dec-05 6:07 
AnswerRe: Thoughtpost P2P Pin
Dave Kreskowiak12-Dec-05 6:29
mveDave Kreskowiak12-Dec-05 6:29 
GeneralRe: Thoughtpost P2P Pin
ShimiG12-Dec-05 6:40
ShimiG12-Dec-05 6:40 
GeneralRe: Thoughtpost P2P Pin
Dave Kreskowiak12-Dec-05 10:07
mveDave Kreskowiak12-Dec-05 10:07 
QuestionAn existing connection was forcibly closed by the remote host Pin
Ricardo Mendes12-Dec-05 6:03
Ricardo Mendes12-Dec-05 6:03 
AnswerRe: An existing connection was forcibly closed by the remote host Pin
Jared Parsons12-Dec-05 6:13
Jared Parsons12-Dec-05 6:13 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Ricardo Mendes12-Dec-05 6:16
Ricardo Mendes12-Dec-05 6:16 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Jared Parsons12-Dec-05 8:45
Jared Parsons12-Dec-05 8:45 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Ricardo Mendes13-Dec-05 0:57
Ricardo Mendes13-Dec-05 0:57 
GeneralRe: An existing connection was forcibly closed by the remote host Pin
Jared Parsons13-Dec-05 7:48
Jared Parsons13-Dec-05 7:48 
QuestionDelegates Pin
DELETEUSER12-Dec-05 5:57
DELETEUSER12-Dec-05 5:57 
AnswerRe: Delegates Pin
Roy Heil12-Dec-05 7:15
professionalRoy Heil12-Dec-05 7:15 
AnswerRe: Delegates Pin
Gerben Jongerius12-Dec-05 8:27
Gerben Jongerius12-Dec-05 8:27 
GeneralRe: Delegates Pin
Den2Fly12-Dec-05 10:25
Den2Fly12-Dec-05 10:25 
GeneralRe: Delegates Pin
Gerben Jongerius13-Dec-05 3:55
Gerben Jongerius13-Dec-05 3:55 

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.