Unselect all rows in datagridview
dataGridView1.ClearSelection(); Should work. Maybe you have code that auto selects rows which is triggered?
dataGridView1.ClearSelection(); Should work. Maybe you have code that auto selects rows which is triggered?
You are using the MenuStrip class. You can override its renderer. Here’s an example, pick your own colors please. public partial class Form1 : Form { public Form1() { InitializeComponent(); menuStrip1.Renderer = new MyRenderer(); } private class MyRenderer : ToolStripProfessionalRenderer { public MyRenderer() : base(new MyColors()) {} } private class MyColors : ProfessionalColorTable { public … Read more
Or, in LINQ, it’s nice and quick: var _priceDataArray = from row in _priceData select new { Item = row.Key, Price = row.Value }; That should then be bindable, to the columns ‘Item’ and ‘Price’. To use it as a data source in a grid view, you just have to follow it with ToArray(). dataGridView1.DataSource … Read more
For all those interested, I have implemented a WPF version of this progress bar avaliable from my blog here (linking so I’ve only 1 place to keep a valid active link). I decided it was better than waiting for something available only on Windows 8 or not available at all. I hope you find it … Read more
This WinUI 3.0 will not obsolete WinForms and WPF at all. Yes, .NET Framework 4.8 will be the last version of .NET Framework, but since we now have WinForms and WPF continuously developed on top of .NET Core, we should not worry. These are the reasons: (and I think it’s proven that WPF and WinForms … Read more
It is a bug in VS. It happens in VS2005 as well. Don’t waste your time: close VS, open it again and everything should work fine.
The problem with the line: select new { c.UserName, c.Password, c.Description } Is that it is creating an anonymous type, and anonymous types are immutable – that is read only. This is why your changes do not get reflected in either the new type or in the original EF object. Now, as for ways of … Read more
Some others: NUnitForms Quail I believe they’re both free, and Quail looks really nice!
The sanctified method is to use CryptoAPI and the Data Protection APIs. To encrypt, use something like this (C++): DATA_BLOB blobIn, blobOut; blobIn.pbData=(BYTE*)data; blobIn.cbData=wcslen(data)*sizeof(WCHAR); CryptProtectData(&blobIn, description, NULL, NULL, NULL, CRYPTPROTECT_LOCAL_MACHINE | CRYPTPROTECT_UI_FORBIDDEN, &blobOut); _encrypted=blobOut.pbData; _length=blobOut.cbData; Decryption is the opposite: DATA_BLOB blobIn, blobOut; blobIn.pbData=const_cast<BYTE*>(data); blobIn.cbData=length; CryptUnprotectData(&blobIn, NULL, NULL, NULL, NULL, CRYPTPROTECT_UI_FORBIDDEN, &blobOut); std::wstring _decrypted; _decrypted.assign((LPCWSTR)blobOut.pbData,(LPCWSTR)blobOut.pbData+blobOut.cbData/sizeof(WCHAR)); If … Read more
Several options here: Use the Document Outline view (View –> Other Windows –> Document Outline) to select the panel you care about. You can right-click on it and choose Bring to Front to put it in front of everything else. Though it’s probably not relevant to what you’re doing, you might consider using a TabControl, … Read more