Probably, you need to add a reference to the assembly to your project:
Open the Project branch in the Solution Explorer pane.
Right click "References" and select "Add Reference..." from the menu that appears.
Click the "Browse..." button in the lower right of the dialog that appears and navigate to the DLL file containing the Util class.
Highlight the DLL file, and press "Open".
Click the "Add" button.
Click the "Close" button
You may also need to add a using line to the top of your .CS file to add the namespace to your code.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Datagridview is harder than I anticipated. I would like to click on my column header and select an entire column to change it, or click on my row header and select an entire row to change it, or select multiple cells to change them or a single cell to change it.
Is this possible with the datagridview object? If so, does anyone have a code example? I've been looking over the net and I'm able to get the column selection to work most of the time, but apparently that disables row selection and I would like both of them, depending on which header is clicked?
I think your requirements sound a little ambitious for the DGV, it sounds like you are more after spreadsheet like functionality which you will not get out of a DGV. You might have to look into some of the spreadsheet controls, none of which are free or even cheap.
Never underestimate the power of human stupidity
Is there any way to select a cell and then if the enter key is pressed, have an input box pop up to input a value. Then taking it further, select multiple cells, press the enter key, input box pops up and you can set that same value for all selected cells? Is this possible in the datagridview object?
I did follow your suggestion. That doesn't mean it gives a working code example that I can insert into my form and start to figure out its intricacies.
I can't even get the event handlers to work with this object, it tells me the following error for the following code?
Error 4 Cannot implicitly convert type 'System.Windows.Forms.DataGridViewCellEventHandler' to 'System.EventHandler' c:\Form1.cs 51 47
this.dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellClick); // works
this.dataGridView1.DoubleClick += new DataGridViewCellEventHandler(dataGridView1_CellDoubleClick); // generates the above error
With multiselect, that appears to just be a property that you enable or disable. If enabled, how can I know which cells I've selected? Then I could input the data for the select cells with a right click command possibly?
How to save text from multiline TextBox2 as (.txt) UTF-16 (Unicode), and not as UTF-8.
This is my code that is not good:
saveFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
//Empty the FileName text box of the dialog
saveFileDialog1.FileName = String.Empty;
//Set default extension as .txt
saveFileDialog1.DefaultExt = ".txt";
//Open the dialog and determine which button was pressed
DialogResult result = saveFileDialog1.ShowDialog();
//If the user presses the Save button
if (result == DialogResult.OK)
System.Text.Encoding ascii = Encoding.Unicode;
contents = ascii.GetBytes(textBox2.Text);
using (Stream fs = (Stream)saveFileDialog1.OpenFile())
fs.Write(contents, 0, contents.Length);
MessageBox.Show("File successfully saved!");
SaveFileDialog has nothing to do with it, it is just a dialog that gets a filename from the user. You save data to a file by using something like the StreamWriter class[^]. You should read the documentation to find out which options to use for what you want to achieve.
I don't know how you 'combine' or handle multiple codings as you are trying to do
 looking at this a bit more, its impossible for a file to have multiple encodings - you have some options - select the best encoding for your needs, or, try and determine what the encoding is eg http://code.google.com/p/chardetsharp/[^] and try to match it [/edit]