When I change the data in the cells of the DataGridView, and I debug, the values that are shown are the new ones, but at the end the DataGridView is not updated. Can you please give an example of possible code to complete what I already have? Thanks.
Hi, all friends:
i want to get a efficient function to sort array, and return a old array index .
For example: double a=[5,4,1,3,2];
how can i get b is [1,2,3,4,5],and index array c is [2,4,3,1,0]?
i want a efficent and quick method...
There is no built in method that will do that for you - the index to the previous array is what causes the problem - and you can't "retrospectively" find it because in the event of duplicates, you don;t know which value to use.
What I would probably do is package the value you want to sort into a struct together with it's original index and sort that, using a comparator that looked only at the values.
The resulting sorted info would include the original array index, and it would be pretty trivial to split them back up if you needed to.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
hi, i have a question.
When i use chart1.invalidate() to refresh chart, it had 3 ms cost betten call chart_paint(), Then i called chart_paint() manully on other thread, it cost less than 1ms,it can reach my requirement. But chart has no refresh, it can not clean up history paint.
So i want to know how to invalidate chart control ,but not to call paint aotumatic?
I got problem with ComboBox in winforms c#. Comboboxes in main window works fine, but comboboxes in form that I open in panel on main window are broken. The wierd things starts to happen... I cant click it to type. I can only open list, select one and then type. Also i cant locate cursor in the middle of text because it highlight whole text. I post code with I open form in panel:
..which is tucked away in a method called "InitializeComponent". That method is called when the form is created. Hiding the form and showing it won't execute the method again. Yes, that may cause weird stuff.
I'd recommend showdialog a form and disposing it when done, preferably wrapped in a using-construct.
--edit foxed fixed typo.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]