Click here to Skip to main content
15,881,882 members

Comments by Chris Ross 2 (Top 35 by date)

Chris Ross 2 6-Dec-16 6:46am View    
My three stars - in general the idea is fine.
Regarding use of 'ref' - given that the exception message is only ever outbound, I would recommend 'out', not 'ref'.
Regarding (in the caller) testing for !ExceptionMsg.Equals("") I would play it a little safer, with !string.IsNullOrWhiteSpace(ExceptionMsg) ... which still tests for empty strings but also for null and strings that have no meaningful content (i.e. are all white space).
Chris Ross 2 1-Feb-16 6:34am View    
If you're asking whether anyone can help you with the problem, the short answer is clearly no :) SOMEone can, but definitely not ANYone. But asking about the state of the world is a question that belongs in the lounge, not in quick answers. (Being a linguistic pedant I'd recommend, if you actually want help, rephrasing your question: "Would someone who can, please help me..." - but to suggest you do that would be rude, so I won't).

As to actual help:

You need to break your problem down into its constituent parts: (1) identifying a column that contains two or more cells with identical values, and (2) how to hilight the column (and how to remove the hilight if a column no longer has duplicates).

With which part are you having difficulties, and what have you tried so far? (I see what your replied to D@nish of what you found online being about rows ... but what have you actually tried?)
Chris Ross 2 29-Jan-16 8:24am View    
I trust you've run your code in the debugger - and have confirmed that execution arrives at your TextChange() method. If it does, then the problem lies in the construction of UserControl1; if it doesn't, the problem lies in the code of Form1 or Form2.

To help you more, it would be helpful to see the XAML of UserControl1.
Chris Ross 2 25-Jan-16 9:09am View    
First - your Google Drive links don't work - because they require the viewer to be signed in.

Second, have you run your code in the debugger to see what is going on?
You have a loop there that adds Tran objects to the Item object - perhaps you have more rows in the dataGridView1 than you expected?

Or, perhaps the item.Trans collection already has an element, for some reason that you weren't expecting, so adding one from the dataGridView1 results in a collection with two elements?
Chris Ross 2 25-Jan-16 9:03am View    
Maybe I missed it scanning the previous comments - but I didn't see any mention of what specific publish method you are using. So - I'll assume you're using the (very obvious and natural to use) Publish tab in the visual studio project settings ... which is Click Once publishing.

On that assumption, have you clicked the Application Files... button (on the Publish tab)? In the popup, tick the Show All tick box, and find your XML file in the file list. Make sure it's Publish Status is Include (I'm guessing it will not be 'Include (Auto)').

Hope that helps.