- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 14
- Posts with Upvotes
- 13
- Upvoting Members
- 10
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
91 Posted Topics
Re: have a look a this: [http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update(v=vs.110).aspxClick Here] You might want to define your da and you dt at the module level and use the builder to create update sql command. | |
The following (see the full code below) successfully adds a page in a section in Onenote. What I don't seem to be able to do is to get the lastly created page on top of the section. Here's the code that is puzzling me. onenoteApp.GetHierarchy(sectionId, OneNote.HierarchyScope.hsPages, out string xmlPages); var … | |
I prepare a table in Excel within a Using () statetement. At the end I UsedRange.Copy() to what I understand is the clipboard. Then I Selection.PasteExcelTable in a Word document. I get an COM Exception "command failed". When I activate the word document and press Ctrl+V the table gets copied. … | |
When I execute this progammatically, I get a table with row heights much larger than when I do this manually. Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table. public void AddClipboard() { Sel.PasteExcelTable(false,false, false); var t = Sel.Tables[Sel.Tables.Count]; t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent); } | |
Hi have this code that runs well for me. It's part of my WordWrapper where Sel is defined as the Selection object. I tried to save `Sel.Font to a var f` variable, and reset `Sel.Font = f`before exit, but that does not work. "Value out of range". /// <summary> /// … | |
Re: This is definitely a double dot problem. You need to wrap the Excel object and implement the IDisposable interface in the wrapper. You also need to release the each Excel.Object you create. A minima you need the code I'm exposing below. ` Imports Microsoft.Office.Interop Public Class clsExcel Implements IDisposable Public … | |
Re: Assuming your Persons have (one or more) Orders, you probably want to add an Orders (as List(Of Order)) property to your Person class. You will then be able to Json you Persons. Let me know if my assumption is correct. | |
I cannot find anything in phpExcel documentation. What I would like is to end up with an associative array with keys from the first row in the excel worksheet. It's something that can be done of course, but is there a native method? | |
I'm using Excel interop and it seems that this functionality needs to run in the User Interface thread. So I execute that from the ProgressChanged backgroundworker event. Is there a way to have the dowork event (that invoked the progress changed event) interrupt execution until the ProgressChanged event is finished? … | |
I have this Linq expression that works well. What is the right approach to test if it has returned anything? internal static void getCreditNotes(string invoiceId, out DataTable creditNotes,out double total) { total = 0; creditNotes = new DataTable(); var q = dt.AsEnumerable(). Where(r => (string) r["invoiceId"] == invoiceId && (string) … | |
I may be very wrong, but in the web world, just installing Bootstrap gives you some basic control over how you controls look. Is there something similar for WPF? I don't seem to find anything, I have a very basic little wpf application with a pageframe, buttons, textblocks and textboxes. … | |
I have this control on my (wpf)form Status <TextBlock x:Name="Status" HorizontalAlignment="Left" Margin="138,0,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Grid.ColumnSpan="3" Height="67" Width="577" Grid.Row="1" IsHyphenationEnabled="True" UseLayoutRounding="False"/> It seems that just setting Status.Text=someValue from within a click event does not refresh until the event is completed. How can this be done (in C#) if one wants … | |
Re: Are you using System.Linq.Dynamic; assuming it exists in your VS. It does not exists in my VS2012 (as far as I have checked). You can download it from here : [Click Here](http://weblogs.asp.net/scottgu/dynamic-linq-part-1-using-the-linq-dynamic-query-library) | |
Re: Have you thought of entering a blank line after you copy so that the next table would be in a separate paragraph? | |
Re: I use interop from vb.net 2008, and they work fine with office 2007 all the way to 2013 included. Not sure about 2003 though. Why do you think you need 14.0 object library? | |
Re: Your payment_apply JOIN does not have a filter. I hope for your sake that that is your problem, otherwise you should rethink your logic from scratch. | |
Re: You can execute the code that triggers the exception in the caller routine between the instantiation of the form and the show(). If the error is triggered, you can then not call the show event. Not sure how "kosher" this solution is but it would be something like this: dim … | |
Re: What is it that makes you think your approach can be improved? | |
Re: Can't you just compute the total at the moment you populate the fields based on the values that are passed by the dgv? The values are probably kept as numeric values no, so you could set the total textbox with the total, formatted as you choose. | |
Re: Well, I think that what this is trying to tell you is that you are supposed to pass the column number (the zero based sequence) into getstring. Here's the definition of [GetString](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getstring(v=vs.110).aspx) 'Declaration Public Overrides Function GetString ( _ i As Integer _ ) As String | |
Re: Not sure how helpful this is going to be for you but here is how this looks in one of my projects (called B040) Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.b040.frmMain End Sub | |
Re: .. then there is the question, do we have to take into account that the users can enter separators like "/" or "-". It wouldn't make it much more complex, but if that is not in the picture (because the imput field is made numeric only) then there is no … | |
Re: I may be very wrong, but it seems to me that you are testing an awful lot of times (the number of persons x the number of events) whether `Incident_Type.text = "Party"` and `"Event_Assoc1.text <> "Guest"` Unless I'm missing something major, or you are not telling us something this : … | |
Re: I think it would be more elegant to use the HTML5 placeholder approach, where if there is no value in the table, you would put something like "put a value", and make sure at validation of the textbox that a correct value was entered, or delete whatever was there. If … | |
Re: Instead of filling the detail tableadapter in the load event of the form, you could do that in the "RowEnter" event of the header datagridview. You need to pass the key to the detail tableadapter. You will find the the key in `DataGridView.CurrentRow.Cells("keyfiedColumnName").value.` Let us know if you need help … | |
Re: You define `a` as a `date` in line 7, you should not be surprised that it cannot accept a .`tostring` expression no? | |
I have a form with a dgv on it. The dgv has 1 column defined as a DataGridViewCheckBoxColumn. I would like this dgv to behave as a radiobutton group, i.e. when I click on one cell, that should be set to true, and the others to false. I've got it … | |
Re: The checkboxcolumn is rather straightforward. I'm not sure that is your problem. Is your datagridview bound? If so you need to bind the CheckBoxColumn to a boolean variable. Otherwise if you can see in the cell's value property if the checkbox was checked or not. Let us know if this … | |
Re: Hmm.... maybe in Notepad Wordwrap (under Format) is set? | |
Re: I like tooltips if that works for you. You set this in the form's load event. ` ToolTip1.SetToolTip(Button1, "This is a tooltip")``` Mind you this is VB. I would be very much surprised that it is different in c#. Let us know if this helps, and if we can be … |
The End.