Best Of
Re: Using LinqPad's native Spreadsheet column header issue
If you are looking for a workaround would it be feasible to convert values to a DataTable and change the ColumnName?
For example, if you use FastMember nuget package you can do something like
DataTable table = new DataTable(); using (var reader = FastMember.ObjectReader.Create(values)) table.Load(reader); table.Columns[0].ColumnName = "Hot Potato"; var importWorkbook = Util.ToSpreadsheet(table, "Test", true);

Re: Where are LINQPad.exe arguments documented?
You can find this by pressing Ctrl+F1 and searching for 'arguments'.
Use -run to run a query immediately.
Use -hideeditor if you want the results zoomed and the editor collapsed.
Use -newinstance to start a new instance of LINQPad.

Re: Option to always prefix table names with schema?
I've been using the latest beta with "always use schemas" checked and so far it's working perfectly. Thank you, this feature has brought another piece of joy to my LINQPad experience!

Re: Closing Separate Results Window / maximizing pane automatically
This should be fixed in 8.8.5.

Re: Closing Separate Results Window / maximizing pane automatically
I've added the following methods to the Util class in 8.8.4:
Util.HideEditor(); Util.HideResults();

Re: autocompletion putting space after method name
Thanks - there will be a fix for this in the next build.

Closing Separate Results Window / maximizing pane automatically
I think the X on the Results Window when it is Undocked should close the Results Window instead of docking it - there is a dock button immediately below the X in the title bar if that is what is desired. Alternatively, perhaps it should also match the docked Results pane and have a close button to the right of the Dock button.
It would also be nice if there was a way to automatically Collapse the Editor (or maximize the results pane) when a query is executed.
BTW, thanks for LINQPad and your responsiveness. It is still one of the best products I have ever used.

Re: Is it possible to call c# Method from js?
- In C# create invisible button with
onClick
handler. - In JavaScript set button text to the data you would like to pass to C# and initiate button click.
string UrlSweetAlert2Js = "https://cdn.jsdelivr.net/npm/sweetalert2@11"; Util.HtmlHead.AddScriptFromUri(UrlSweetAlert2Js); // Create button for receiving callback fron JavaScript. var callbackButton = new LINQPad.Controls.Button ("", onClick: btn => btn.Text.Dump()) { Visible = false }.Dump(); var js = @$" Swal.fire({{ title: 'Do you want to save the changes ? ', showDenyButton: true, showCancelButton: true, confirmButtonText: 'Save', denyButtonText: `Don't save` }}).then((result) => {{ // Get callback button ID. let b = document.getElementById('{callbackButton.HtmlElement.ID}'); if (result.isConfirmed) {{ Swal.fire('Saved!', '', 'success'); // Update button text. b.textContent = '{nameof(Saved.Yes)}'; }} else if (result.isDenied) {{ Swal.fire('Changes are not saved', '', 'info'); // Update button text. b.textContent = '{nameof(Saved.No)}'; }} else {{ // Update button text. b.textContent = '{nameof(Saved.Cancel)}'; }} // Do callback back to C#. b.click(); }}); "; Util.InvokeScript(false, "eval", js); enum Saved { Yes, No, Cancel }

Re: LINQPad.Controls Event sender got null
var button = new LINQPad.Controls.Button("Copy").Dump(); button.Click += (sender, e) => { var buttonSender = sender.GetType().Dump(); };
LINQPad.Controls.Core.HtmlElement
