User Profile
Collapse
-
Grrr... I'm still hoping to figure this out. If I can't figure it out today then I'll probably just be leave it happening on the MouseUp event. -
There is an event for CellMouseDown already. And the properties of e give me row index and column index and such. The event fires when the mouse button is pressed down overtop of a cell on your DataGridView (the new DataGrid). I've searched the MSDN site which gives some examples of using this event. Their example pops up a MessageBox on CellMouseDown, which tells you the column/row location of the cell you clicked. I reproduced their example,...Leave a comment:
-
How to select a row in a DataGridView on MouseDown
Hello,
This is really frustrating me. I am trying to get my application to select an entire row in my DataGridView on MouseDown. I can get it to select the whole row on MouseUp no problem, but it will not do it on MouseDown. I would think this would be extremely easy, but for some strange reason, no matter what I try, it just doesn't do it. Can anyone help me with this? Here is the code that I think should work:
... -
I think I found a work around. I'm not spawning my new forms off in new threads, instead I'm keeping them all in the same thread. When I close a spawned form, if it's "get data from the database" thread is not complete, I just do a thread abort on it and all is well. Before I was running the form itself in a new thread so that if the user tried to close it, it would actually keep running in the background until the thread completed successfully,...Leave a comment:
-
Some additional info: Right now it will add the new menu item, and successfully remove it, but for 1 newly opened non-modal sub form only. If I try to open a second instance of the sub-form, nothing happens.. the form doesn't even open. But then when I close the 1st one I had opened, the second one I tried to open appears....Leave a comment:
-
Dilemma updating UI from seperate thread
I have encountered a problem that I am having trouble solving. I have one main UI. From this UI you can bring up a new non-modal Windows form that displays some other data. However, each time a new form is brought up, it is done so in a new thread. What I want to do, is have these new forms (in their new thread) make a call to a public method in my main UI's class. This method(funciton ) accepts a string argument (and returns a string as well),... -
oooommmmmmggggg ......
I just figured it out, like seconds after posting the question, lol. The problem was that the DataGridView object had it's visible property set to false when I tried to programatically select the row at index 0. I then later on had a line of code setting it's visible property to true. After I noticed this, I moved the row selection AFTER the line that made it visible, and now everything works :)...Leave a comment:
-
Help with threads that update UI object properties
Hello,
I am coding a Windows Form application in C#.NET.
I have read extensively about threading, and having to use invoke and a delegate in order to marshal
back onto the UI thread and make changes, and I am doing this, but I suspect I am still having a
problem relating to threading.
Here is a kind of generic version of what I am trying to do. The problem is that the very...
No activity results to display
Show More
Leave a comment: