Click here to Skip to main content
14,331,896 members

Comments by Clifford Nelson (Top 200 by date)

Clifford Nelson 30-Sep-18 14:50pm View
   
Until you understand XAML, you should not be working with WPF. The point of WPF is the XAML. This is a declarative language. If you do not want to deal with XAML go to WinForms
Clifford Nelson 26-Sep-18 1:37am View
   
You should include your XAML.
Clifford Nelson 17-Jul-18 19:58pm View
   
Well that is true. If it is possible then you would need to add a check. You could make it a condition, and then should have a Debug.Assert. :-}
Clifford Nelson 1-Jul-18 2:51am View
   
I am no expert in C, but it appears you need to read a string:
gets( str );
and to get the length
strlen(str );
As I said I am no expert in C


Clifford Nelson 26-Jun-18 13:57pm View
   
Thanks so much for this. I had figured it out already.
Clifford Nelson 26-Jun-18 11:21am View
   
Might be a good idea to look at your keys and make sure those keys needed for the query have indexes. Also might figure out how to avoid all those converts, they cannot be helping
Clifford Nelson 25-Jun-18 15:51pm View
   
Glad it worked.
Clifford Nelson 16-May-18 14:11pm View
   
Deleted
Try the code above. It removes the null which should not be there.
Clifford Nelson 16-May-18 14:06pm View
   
Deleted
static void Main(string[] args)
        {
            List<carowner> owners = new List<carowner>()
            {
                new CarOwner(){Name="Hari", Gender="Male",Age=23,      Cars= new List<car>(){new Car(){Name="Ambassador", Type="Heavy"},new Car(){Name="Maruti", Type="Light"}}},
                new CarOwner(){Name="Ruchira", Gender="Female",Age=18, Cars= new List<car>(){new Car(){Name="Sumo", Type="Heavy"}}},
                new CarOwner(){Name="Shyam", Gender="Male",Age=45,       Cars= new List<car>() },
                new CarOwner(){Name="Rakesh", Gender="Male",Age=40,      Cars= new List<car>(){new Car(){Name="Renault", Type="Heavy"},new Car(){Name="Pageiro", Type="Heavy"}}},
                new CarOwner(){Name="Sarmistha", Gender="Female",Age=40, Cars= new List<car>(){new Car(){Name="Innova", Type="Heavy"},new Car(){Name="Maruti", Type="Light"},new Car(){Name="Eon",Type="Light"},new Car(){Name="Jeep",Type=""}}},
                new CarOwner(){Name="Aliah", Gender="Female",Age=64,     Cars= new List<car>(){new Car(){Name="Bolero", Type="Heavy"},new Car(){Name="Hyundai", Type="Light"}}},
            };

            var results = owners.GroupBy(o => o.Gender, o => o.Cars, (key, g) =>
                new 
                {
                    Gender = key,
                    Name = g.SelectMany(cars => cars)
                    .Select(car => car.Name).Distinct().OrderBy(k => k).ToList()
                });

            foreach (var result in results)
            {
                Console.Write(result.Gender + ": " + string.Join(", ", result.Name.ToArray()));
                Console.WriteLine();
            }
            Console.ReadLine();
        }
Clifford Nelson 16-May-18 14:03pm View
   
Deleted
The reason you get a null exception error is because you did a bad think in your sample:
Cars= null
Try looking at https://www.barnesandnoble.com/w/effective-c-bill-wagner/1118903807. One of his suggestions is avoiding null. Did you put null in there just to screw things up. I could fix it with a simple where clause but better just to initialize the collection with an empty collection.
Clifford Nelson 16-May-18 13:28pm View
   
Yes, Copied from working console application. It has been fixed to deal with null Cars property.
Clifford Nelson 16-May-18 13:04pm View
   
Did not use linq like he wanted.
Clifford Nelson 27-Apr-18 7:47am View
   
Why do you have the ToList(). Should not need that.
Clifford Nelson 1-Apr-18 20:23pm View
   
What you do is make the DependencyProperty of type bool and Bind the DependencyProperty to the IsChecked value of the ToggleButton.
Clifford Nelson 25-Mar-18 18:45pm View
   
You say 'I would like to inner join the column education...'. That is hard when you have education only in one table.
Clifford Nelson 4-Mar-18 12:43pm View
   
Have some things I have not used in this solution. Solid thumbs up.
Clifford Nelson 4-May-17 12:15pm View
   
Still does not do what I want. I wanted to create an application. I have solved the problem, but want to see if I can create something smarter than the windows shortcut. In other words a replacement. I did not ask how to actually do it since there would be little reason to ask the programming community on how to do something in windows. I want to know how to create an editable property in the file property window.
Clifford Nelson 3-May-17 17:05pm View
   
That is for adding context menu items, not for adding a editable property to an application
Clifford Nelson 3-May-17 17:03pm View
   
So tell me what happens when you create a batch command. The command window shows as long as the application is running unless specifically closed. Thus for every batch started, two windows will appear. I do not think that is very desirable. You may. In my opinion shortcuts should have supported relative paths, but they do not appear to except through bad workarounds.
Clifford Nelson 3-May-17 14:54pm View
   
Ok...Here it is. I want to create a very simple application that will be able to open a file using a relative path that can be set in windows explorer by changing the value of a property associated with the executable. The current shortcut only seems to support an absolute path which is useless for portable drives, and a folder copied with shortcuts will no longer work.
Clifford Nelson 1-May-17 17:52pm View
   
Have done
Clifford Nelson 11-Nov-16 19:02pm View
   
Indicates that an enumeration can be treated as a bit field; that is, a set of flags. https://msdn.microsoft.com/en-us/library/system.flagsattribute(v=vs.110).aspx
Clifford Nelson 10-Nov-16 18:52pm View
   
In know that
string iGrade = (Grade.Low Grade.High ).ToString();
is not valid syntax in C# 6.0. No easy way to do what you are trying to do
Clifford Nelson 26-Aug-16 9:41am View
   
You should mark the question solved and up=vote if you found it helpful
Clifford Nelson 15-Jul-16 11:55am View
   
I tried. Live Visual Tree does not get information on this new feature. Only for the old Live Visual Tree, don't know what this new control is called, so don't know what to google. I would upload a picture, but codeproject does not support inserting pictures as far as I know.
Clifford Nelson 11-Dec-13 19:16pm View
   
You should post this on the article since the author should be best able to help, and he should also fix his solution files anyway.
Clifford Nelson 22-Aug-13 14:29pm View
   
Have updated the solution.
Clifford Nelson 16-Aug-13 16:48pm View
   
So why do you point out you have multiple projects. If this is all in the same project... What is in the other projects?
Clifford Nelson 10-Aug-13 14:39pm View
   
There is not enough information to figure out what your problem is. I would put a breakpoint in in the doubleclick and see what your situation really is
Clifford Nelson 2-Aug-13 15:04pm View
   
Can't append to a XML document
Clifford Nelson 31-Jul-13 13:05pm View
   
Yes it seems you are right. I did not try to test my suggestion, and it was only a suggestion. Now that SA has put the input, I can see the issue. I would have probably used a canvas in the first place, so would have avoided having the problem. A low vote with no information is useless.
Clifford Nelson 30-Jul-13 17:13pm View
   
Somebody downvoted. It would be a nice idea to know why. Do you know for sure this will not work, or do you have the real solution? If so, please share it.
Clifford Nelson 30-Jul-13 15:55pm View
   
I would stop the code in the debugger and look at the button and it's data context. Also, you should just cast, not use the sender as Button.
Clifford Nelson 18-Jun-13 20:38pm View
   
Just add it to the question with the pre tags to let it look like code. In a comment like this very hard to read.
Clifford Nelson 18-Jun-13 20:37pm View
   
I would contact DevExpress on this. If you were using a standard Microsoft WPF grid you might get an answer, but very unlikely you will get an answer on a 3rd party control because there are few people using any one 3rd party control.
Clifford Nelson 29-May-13 19:42pm View
   
That worked. Thanks. May fix some other issues I have had with using resources.
Clifford Nelson 29-May-13 18:10pm View
   
The ResourceDictionary works fine for other styles, that includes ToggleButton, so very unlikely that is the problem
Clifford Nelson 9-May-13 19:29pm View
   
Deleted
This has the problem that if the parent directory does not exist, it will not work.
Clifford Nelson 24-Apr-13 18:46pm View
   
To start, need to show the developer tab: http://msdn.microsoft.com/en-us/library/vstudio/bb608625.aspx. Should be able to search after that for help. Contact me if you cannot.
Clifford Nelson 18-Apr-13 22:58pm View
   
WRong direction and already suggested.
Clifford Nelson 18-Apr-13 22:57pm View
   
Wrong direction.
Clifford Nelson 16-Apr-13 19:00pm View
   
Would help to see your XAML and your ViewModel.
Clifford Nelson 8-Apr-13 22:29pm View
   
Forgot to clean that stuff out. Just replace with var. Should have been strReturn
Clifford Nelson 8-Apr-13 17:14pm View
   
What happens is that the first part would read the text into memory, the second continues after the task has completed, and, if you are on the UI thread when you start, you will be on the UI thread when the task completes. Besides possilby Async, this is actually quite easy.
Clifford Nelson 5-Apr-13 20:43pm View
   
I would not bother. That paper should be as good as any book. There are also a lot of other articles, including on the codeproject site. One on the TPL is http://www.codeproject.com/Articles/152765/Task-Parallel-Library-1-of-n
Clifford Nelson 4-Apr-13 17:25pm View
   
I know it is a nit, but action is misspelled
Clifford Nelson 3-Apr-13 13:18pm View
   
Deleted
This is actually the wrong forum. This is the C# forum, which is not the best for SQL-Server questions
Clifford Nelson 13-Feb-13 20:10pm View
   
I know it is wierd. Not really practical to post given that it is a project that uses both Infragistics and telerik. I know I hate infragistics, not sure about telerik. Thought is was interesting, and was hoping somebody had some incite.
Clifford Nelson 22-Nov-12 16:14pm View
   
I cannot makes head nor tails of this even with the translation. In any case it is way too broad a qusetion.
Clifford Nelson 8-Nov-12 13:51pm View
   
Cannot answer you question with so little information. Maybe should include code.
Clifford Nelson 5-Nov-12 11:12am View
   
Happy to oblige. Linq is quite powerful, but can be very confusing (try doing a distinct). It is probably one of the best tools around since it saves so many lines of code.
Clifford Nelson 2-Nov-12 18:56pm View
   
Using the PreviewTextInput is not a good idea. KeyDown event works just fine. Also, much too complex for what was asked for. Don't have to worry about signs, or decimal points.
Clifford Nelson 2-Nov-12 18:48pm View
   
That is not necessarily true since cannot deal with context issues with this technology. It works for simple validation, but not validation against other values. Not my vote of 1.
Clifford Nelson 2-Nov-12 16:03pm View
   
I agree completely. This is how I would have done it.
Clifford Nelson 2-Nov-12 14:59pm View
   
Somebody screwed up the solution
Clifford Nelson 31-Oct-12 13:31pm View
   
Then I need to see the code for the another button: "So, in the same user interface, there is another button, which when it is clicked, this pre-defined toolbar will show up, like following:" That is the button that needs to be the "ToggleButton"
Clifford Nelson 30-Oct-12 14:34pm View
   
Do not try to use the sendkey, just manually do it, use the setfocus command. I have not found the sendkey works very well.
Clifford Nelson 29-Oct-12 19:46pm View
   
You are setting the button style to the same style in both parts of the if statement, so maybe that is your problem
Clifford Nelson 29-Oct-12 19:35pm View
   
You are getting a xaml error, but have not included the xaml. You are not going to get a good answer without providing the xaml
Clifford Nelson 29-Oct-12 19:20pm View
   
Think you need to provide some code. Unfortunately the SelectedItem is not a DependencyProperty which means it does not completely support Binding.
Clifford Nelson 26-Oct-12 15:16pm View
   
You wake up the service when its time to send the email. Could use a service to start the email application, but still need to trigger the emails, and that requires something to be running to know that it is time to run the application.
Clifford Nelson 24-Oct-12 22:53pm View
   
Thanks for the comment. It is just text, but still seems that could be quite a few fields, and especially since the link provides a generic to solve the problem, it becomes pretty trivial to save an object.
Clifford Nelson 23-Oct-12 12:13pm View
   
I did not have an issue with "if(i is jigger<>)" but with "(i as jigger<>).DoSomething();". Should have just done a cast instead of the "as"
Clifford Nelson 22-Oct-12 21:32pm View
   
I missed the return of T. The only thing you could do is use a return type of object. The only option would be is have T derive from something, and have an appropriate functionality. More than likely T would be derived from some type.
Clifford Nelson 21-Oct-12 11:26am View
   
I will look at this tomorrow. You are right about this not being MVVM, and that is really the right way to do it.

Clifford
Clifford Nelson 18-Oct-12 20:19pm View
   
You are missing the XAML. I do not have some of the controls that are in your code. I tried
Clifford Nelson 17-Oct-12 12:34pm View
   
Thanks
Clifford Nelson 17-Oct-12 12:31pm View
   
You did not have this information in the question. You still should have been able to do the same thing with Binding since the information would have been available when the control needed it.
Clifford Nelson 17-Oct-12 12:29pm View
   
The WPF TabControl has an ItemsControl DependencyProperty, which allows you to have a collection of ViewModels that can control the tabs. Now you want to have different content in the Tabs which can be handled with a ValueConverter using the ViewModel type to decide which usercontrol to display in the tab. Please note that the
Clifford Nelson 16-Oct-12 16:08pm View
   
I do not know if you went the behaviour way, or the straight forward way, but good luck. Would be nice is you rated the answer and marked it as answered.

Clifford
Clifford Nelson 16-Oct-12 11:54am View
   
Reason for my vote of 1
Not much of an article
Clifford Nelson 9-Oct-12 11:19am View
   
If you want to apply a style (which must be specifically for a label) then just
<label style="AStyle">content</label>. Your question is just too vague
Clifford Nelson 3-Oct-12 20:10pm View
   
Definately an idea, but not what I was hoping for.
Clifford Nelson 3-Oct-12 17:02pm View
   
The code can be used to help in creating a way to export data from excel. It also provides an easy way move data to an object, providing the user feedback on errors before actually committing to send the data. It still needs the code to actually do the export, but if you have field headers already defined, it can find those headers and read from there. All that needs to be done is to take the C# object and move it into the database.
Clifford Nelson 2-Oct-12 23:34pm View
   
Thanks for the vote of confidence
Clifford Nelson 2-Oct-12 21:25pm View
   
Thanks. Thought I had put it in the solution.
Clifford Nelson 2-Oct-12 19:01pm View
   
YOu fill probably find that Microsoft does not want you to have access to that information, so will not make it easy to get. This is a privacy issue and Microsoft does not want to be liable. My guess is that the only way to get that information is directly from the web page, and you have to hope that Microsoft does not change the format too oftn.
Clifford Nelson 27-Sep-12 11:41am View
   
Glad to be of help, can you vote on the question also?
Clifford Nelson 21-Sep-12 2:57am View
   
So explain how two way binding works with Command. Command is the ICommand interface, and provides a way to execute code. Not much point in TwoWay with ICommand. Incidently, a ToggleButton is basically a checkbox, which is probably why there is a Command argument.
Clifford Nelson 20-Sep-12 13:18pm View
   
So why is Mode=TwoWay in Command="{Binding CheckCommand, Mode=TwoWay}"
Clifford Nelson 19-Sep-12 17:17pm View
   
Create an infrastructure, and then you can post an article on Codeproject with the code. Then there will be something better.
Clifford Nelson 12-Sep-12 15:01pm View
   
To ensure that it is a stream, obviously add to the where clause. The complexity, I think, is actually less. The streams already support IDisposable. Also, can just make the Test<t> public, which would make it much more flexible, expecially if it is designed to work with any instance of a class that inherits from a base class.
Clifford Nelson 7-Sep-12 17:26pm View
   
Reason for my vote of 3
Fixed the download, still need to add the picture
Clifford Nelson 6-Sep-12 19:21pm View
   
Deleted
Reason for my vote of 1
Problems with the picture, download, etc
Clifford Nelson 6-Sep-12 19:20pm View
   
Deleted
Reason for my vote of 1
Problems with the picture, download, etc
Clifford Nelson 6-Sep-12 16:48pm View
   
Your question is unclear. So if I have "10" do you want "Ten"?
Clifford Nelson 6-Sep-12 16:45pm View
   
What is the source of the slides. Is it images, what. Also, why a canvas. This sounds like what you want to do use a contentcontrol and change the content every so many seconds.
Clifford Nelson 30-Aug-12 15:22pm View
   
Sure, just have to write all the code to do it. Easy enought the read an excel spreadsheet. You can create an object to put the data into. You then can serialize the objects. Just reverse the process.
Clifford Nelson 29-Aug-12 16:49pm View
   
You need to tell the people what technology you are using: WinForm, WPF, ASP.NET...
Clifford Nelson 27-Aug-12 11:43am View
   
I understand. Thanks
Clifford Nelson 24-Aug-12 12:49pm View
   
I looked at most of them, but they do not seem to have anything to do with editing. I have changed the EditMode property with no luck. Maybe if you are an expert with WinForms you can download the project and see if you can see anything. I did not post code because I am not sure where the problem is. It uses TypeDescriptor and PropertyDescriptors. This may cause problems I am not sure. Really do not want to have to go to WPF unless I have to, but I have to admit that maybe I should since WPF is so much more powerful and I am much more comfortable with the technology.

Thanks
Clifford Nelson 23-Aug-12 17:33pm View
   
Yes. I have tried changing a bunch of properties on the grid, but nothing seems to work. I am probably missing something minor. I just do not have a lot of recent experience in Windows Forms. Once I have editing, I can allow the information to be changed, and validate the changes.
Clifford Nelson 23-Aug-12 15:01pm View
   
I found the reference: http://msdn.microsoft.com/en-us/library/ee372287.aspx. It is no where near as easy as with time formatting. So using timeSpan.ToString(@"dd\D\:hh\H\:mm\M\:ss\S") works
Clifford Nelson 23-Aug-12 14:25pm View
   
Updated my solution with the letters
Clifford Nelson 21-Aug-12 11:36am View
   
Definately not the whole answer, unlike yours. Thanks for the vote.
Clifford Nelson 20-Aug-12 20:35pm View
   
If you were interested in associating the two, the best would be to have the empolyee record have a department property, and the department have an employee collection. Then it is really easy. What you end up with is a parent child relationship where the child points back to the parent. This is quite common, and if you investigate a lot of the objects that are written by Microsoft you will see a parent field that points back up the chain. I have found that the Heads First series has a lot to offer to try to explain things, so would recommend http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=sr_1_1?ie=UTF8&qid=1345509191&sr=8-1&keywords=heads+first+object+oriented+programming.
Clifford Nelson 17-Aug-12 17:57pm View
   
I do not consider telling somebody to go to google to be a solution. Point to something specific. You could post this answer for any question asked on CodeProject.
Clifford Nelson 17-Aug-12 16:52pm View
   
Glad it is what you wanted. Using the TimeSpan as others suggested really was not that good a solution. You count have gotten the same thing by just multiplying, so why bother.

And yes, thanks so much for the vote and the accepting of the solution.
Clifford Nelson 16-Aug-12 13:56pm View
   
Your question is unclear, maybe you should post code that will show example of where you are having problems.
Clifford Nelson 16-Aug-12 13:26pm View
   
I am a WPF developer, have not really worked in WinForms in years. However right now working with Excel Add-In and putting WPF into Excel Add-in is just not worth the effort. Feel like I am back in the stone age.
Clifford Nelson 16-Aug-12 13:21pm View
   
Great catch, submit solution and I will say you solved it.
Clifford Nelson 15-Aug-12 19:38pm View
   
I am not an ASP.Net developer, but would think you could set up a communication link just like with a database. In fact I would think you could use WCF. Then pass requests via this link. You could always just use a database with the requests and get them from there.
Clifford Nelson 15-Aug-12 19:04pm View
   
It would have been real nice if the person that voted one told me why they voted 1. I was providing a suggestion, and at least if the @$%#0% would tell me why, I could learn something.
Clifford Nelson 15-Aug-12 19:03pm View
   
Since he has permissions, it would seem that he just needs a service to read requests and to access the actual disks.
Clifford Nelson 15-Aug-12 17:09pm View
   
My 5
Clifford Nelson 15-Aug-12 14:53pm View
   
I was hoping to find out how to use dynamic objects, but this works.

Thanks
Clifford Nelson 14-Aug-12 17:29pm View
   
OK gave you a 5 as promised
Clifford Nelson 14-Aug-12 14:09pm View
   
Now try to solve the question instead of convertion back. That is basically the same code I showed above except one minor difference. He did not want the converton from a string to a number, he wanted a number to a string. That one is harder.
Clifford Nelson 14-Aug-12 11:14am View
   
Have you tried coding your solution yet????
Clifford Nelson 13-Aug-12 17:14pm View
   
Since obviously somebody has also been mislead (voted you a 5 when you are wrong and don't know it), I will explain better. In a base system you have a 0 and however many numbers as you specify. If A is zero, then you would have a never ending set of A's when you have any mod. So A is one. Then what is AA. You would think obviously 27, but it is not since Z is 26 and then A? (where ? is the zero value would be 27, and AA should be 28. If you take A as zero instead, then after Z would increment to BA (1 = B, 0 = A), that's not right either.
Clifford Nelson 13-Aug-12 16:35pm View
   
So I did not explain it so well. Best thing is for you to try your code. Do some work. that will prove it. If you can post code that works with simple base 26, as I said (and you ignored), I will give you a five.

PS. My code will work with three letters, and I posted both the coversion to and from.
Clifford Nelson 13-Aug-12 15:29pm View
   
I voted it down because it is wrong. It is not a straight base 26 because there is also the blank. You did not test it. If you can create a example that uses straight base 26 I will correct my vote. Wish it was so simple. Also, did not provide the code. You shot from the hip, and missed by a mile. Next time spend a little time testing your concept before posting.
Clifford Nelson 13-Aug-12 13:32pm View
   
This is acutally a hard question if one does it algorithmically. Sort of base 27, but sort of not.
Clifford Nelson 10-Aug-12 12:07pm View
   
I think this is a good question. It is sometime hard to figure this out. logically the icon should be associated with the solution, not an individual project
Clifford Nelson 8-Aug-12 17:59pm View
   
Have you tested this. I doubt it will run something on the client side. Might run on server side however.
Clifford Nelson 7-Aug-12 16:18pm View
   
SO how about telling us if this is asp.net, winform, silverlight. Also use DataGridView so we are sure that we know the control. ALso please edit your quesiton, don't add to the comments. That will mean somebody can easily see the issues.
Clifford Nelson 7-Aug-12 16:13pm View
   
This is a comment and an answer
Clifford Nelson 6-Aug-12 17:36pm View
   
Maybe this will help: http://www.codeproject.com/Articles/100175/Model-View-ViewModel-MVVM-Explained
Clifford Nelson 3-Aug-12 17:13pm View
   
Agree, should not have answered. Doubt your answer really is the answer they are looking for. Question is unclear and could mean a number of different things.
Clifford Nelson 3-Aug-12 12:46pm View
   
You need to specify environment: ASP, WinForm, etc
Clifford Nelson 27-Jul-12 12:41pm View
   
Sorry! I only answered the question, finding the problem for what was asked. I did not debug the whole method. He did not ask about the Finally, and in any case, if an exception is thrown, nothing will be returned anyway because and exception was thrown, so why worry. You better go back to your books.
Clifford Nelson 27-Jul-12 12:37pm View
   
Deleted
Sorry! I only answered the question, finding the problem. I did not debug the whole method.
Clifford Nelson 27-Jul-12 11:10am View
   
This is a quetion that is way too open, and large. I would get a C@ book and start working on learning either WinForms or WPF, or you can use ASP.NET
Clifford Nelson 26-Jul-12 13:49pm View
   
Thanks very much. There was another question on this, and I answered it, but forgot the answer.
Clifford Nelson 26-Jul-12 2:43am View
   
I was not sure about the question, but thought that you wanted to run the installer on one machine and install database on another machine.
Clifford Nelson 25-Jul-12 17:03pm View
   
Helps if you include the environment, assuming WinForms
Clifford Nelson 25-Jul-12 13:57pm View
   
You must not be running in Desktop. Are you running ASP.NET or Silverlight.. I have seen issues with STA (single thread apartment) but not this. Look at http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c409b6b6-acef-470a-b4b3-4b48e210dfc6/. I suspect you will have to do some custom dialogs. I am not an ASP.NET developer. THis may also help: http://forums.asp.net/p/978886/1247167.aspx
Clifford Nelson 25-Jul-12 12:46pm View
   
I have added to my response. Hope that helps.
Clifford Nelson 24-Jul-12 22:56pm View
   
Must be that you want to save a file on a remote system. Am I correct. Otherwise it is just using the Open/Save dialogs. If you do want to save/open to a remote system, you have to have installed program on the remote system because Windows does not like to allow remote access to a oomputer for obvious reasons. One way to do this is work thru the PowerShell remote features.
Clifford Nelson 20-Jul-12 18:04pm View
   
That is probably because you have to be specific. In other words, you need to set margin on particular controls (ie TextBox, TextBlock, etc). I have never seen anybody attmept to set properties for Control, or any of the other elements that are not concrete.
Clifford Nelson 19-Jul-12 13:55pm View
   
It is easily possible. If you manually create an excel spreadsheet as shown above, you can be selective about the data you insert in the spreadsheet. I beleive you can also do it by just creating a new query. This may also help: http://msmvps.com/blogs/deborahk/archive/2009/07/23/writing-data-from-a-datatable-to-excel.aspx
Clifford Nelson 16-Jul-12 12:45pm View
   
Glad to be of help. Would be nice if you rated and answer and maked the question as solved by this answer.

Clifford
Clifford Nelson 14-Jul-12 13:22pm View
   
I have done animations using straight WPF. When I was working at Microsoft that is how all the developers did the animations in the team I worked with. Of course they were fairly simple.
Clifford Nelson 13-Jul-12 18:42pm View
   
As usual. The MSDN articles are almost useless in helping someone understand some subject. Better to look for some 3rd party writeup.
Clifford Nelson 13-Jul-12 12:49pm View
   
When you talk about no code behind, are you looking at an MVVM solution. XAML is somewhat limited in do any sort of calculation, so sum/count would be a little beyond it. I would like it if Microsoft had continued to develope XAML since I think it could do so much more.
Clifford Nelson 11-Jul-12 13:50pm View
   
Basically what I was recommending, but probably want to throw a specific exception so that the problem can be more clearly determined
Clifford Nelson 10-Jul-12 19:24pm View
   
Why all the ADO articles since he was asking about C#, not about ADO?
Clifford Nelson 29-Jun-12 12:08pm View
   
Whoever gave me the one, my code behind was obviously the solution. If I had had more code, I would have gotten further, like the solution.
Clifford Nelson 28-Jun-12 18:29pm View
   
That definately does not work. You made an serious error:

sourcePath
"C:\\appl\\pimbeta\\tlc\\compliance\\ltalimits\\server\\config"
Path.GetDirectoryName(sourcePath)
"C:\\appl\\pimbeta\\tlc\\compliance\\ltalimits\\server"

from the immediate window
Clifford Nelson 28-Jun-12 17:34pm View
   
I totoally agree. One of the issues I have with Visual Studio is that sometimes something builds on one machine but not another because of things left in the bin folder.
Clifford Nelson 28-Jun-12 17:04pm View
   
My 5 also. That is also true when publishing to CodeProject. Even get rid of the Solution file if it is a single project solution.
Clifford Nelson 28-Jun-12 12:52pm View
   
We have been looking at AutoComplete TextBox here, and had all sorts of problems. For whatever reason, it is difficult to get the combobox to completely work right for this feature. There are some really strange interactions. We also decided to go with the WPF toolbox version.
Clifford Nelson 27-Jun-12 17:17pm View
   
Did it give you much performance improvement? Also, mark question as answered. The first guy had answered the question.
Clifford Nelson 27-Jun-12 17:00pm View
   
For a simpler application, also have clickonce: http://msdn.microsoft.com/en-US/library/t71a733d(v=VS.80).aspx
Clifford Nelson 26-Jun-12 17:46pm View
   
There are too many ways to write dates that can be confused. If at least the month is written out or abbreviated (no numbers), you have some hope of being able to distinguish the dates. However it is common to write dates in the form mm-dd-yy and dd-mm-yy. You can only hope to make it out. This means that you con sometimes only guess.
Clifford Nelson 25-Jun-12 20:23pm View
   
I would look at exactly what you are getting back from the C program. That way you can see the exact bit array out vs. the bit array in. That way you can determine exactly what it is doing.
Clifford Nelson 22-Jun-12 15:44pm View
   
To me the question is unclear. Do not know what the ctrl+tab form is.
Clifford Nelson 22-Jun-12 14:50pm View
   
Glad to be of help. Did this fix the problem. If it did, accept the solution.
Clifford Nelson 22-Jun-12 13:11pm View
   
Have any of these answers helped. I would like to know the answer, so please mark as answered any that help.
Clifford Nelson 21-Jun-12 15:21pm View
   
Great thing to know, thanks.
Clifford Nelson 20-Jun-12 1:30am View
   
Are you using Entity Framework?
Clifford Nelson 19-Jun-12 14:25pm View
   
Understood, sorry I could not be of help. Not sure where what I know can be of help, but thought I would try.
Clifford Nelson 19-Jun-12 13:06pm View
   
I have only done limited work in ASP.NET, so never got this deep into it. Sorry could not help
Clifford Nelson 19-Jun-12 12:15pm View
   
Thanks, I forgot about that. Could have been clearer on you answer. In this case the default was not lost focus, but the row looses focus. Give you a 5 anyway, especially since you were the only one able to answer the question. In this case the problem is that you restated what Microsoft has on thier site, and Microsoft has some of the worst documentation of anybody. The article you gave as a link is just so very bad. Probably would not have been accepted on CodeProject.
Clifford Nelson 18-Jun-12 17:35pm View
   
Don't know, it works in WinForms, and I have not done enough asp.net to know.
Clifford Nelson 17-Jun-12 17:50pm View
   
I would differ with you on that. In fact it is sort of sad that it no longer is supported. It was much easier for non-programmers to learn. VB.NET has a pretty steep learning curve (in fact I think that there is no reason to use VB.NET, just use C#). Obviously, not very good for professional development.
Clifford Nelson 16-Jun-12 0:47am View
   
You need to tell us the environment: ASP, WPF, WinFOrm, and probably be more specific about the grid technology.
Clifford Nelson 16-Jun-12 0:42am View
   
Probably going to have to provide code that shows the problem.
Clifford Nelson 15-Jun-12 22:37pm View
   
Thanks
Clifford Nelson 15-Jun-12 22:37pm View
   
Thanks
Clifford Nelson 8-Jun-12 16:17pm View
   
So what do you think of limiting only to number keys?
Clifford Nelson 8-Jun-12 15:03pm View
   
DO up vote. Whenever I upload to CodeProject I remove the bin, object, snd for single project solutions, the solution files. I have had problems in the past where things work because I have old dll's in the bin folder, and somebody else cannot run out of source control. Good idea to delete these files sometimes to make sure you are not running because of legacy files.
Clifford Nelson 8-Jun-12 12:13pm View
   
Are you doing winforms or WPF?
Clifford Nelson 7-Jun-12 19:06pm View
   
I know. I am actually surprised that I cannot find anything better. I beleive you can make a brush out of pretty much anything, and then paint it on a surface, but then being able to interact with it is another problem. Too bad Microsoft has so reduced its support of WPF/Silverlight.
Clifford Nelson 6-Jun-12 19:38pm View
   
Might help if you gave information about what environment you are using. Could mean Crystal Reports, winforms, wpf.
Clifford Nelson 5-Jun-12 19:39pm View
   
The problem was that the name had never been registered, therefore could not find the name, see my solution.
Clifford Nelson 5-Jun-12 19:39pm View
   
The problem was that the name had never been registered, therefore could not find the name, see my solution.
Clifford Nelson 5-Jun-12 13:34pm View
   
Need to know your environment; ASP.NET, WinForms, etc.
Clifford Nelson 1-Jun-12 12:52pm View
   
So what environment are you using: WinFOrm, WPF, etc
Clifford Nelson 31-May-12 13:40pm View
   
What environment: ASP.NET, WinForm, WPF...
Clifford Nelson 31-May-12 0:15am View
   
Reason for my vote of 5
Very impressive
Clifford Nelson 30-May-12 20:48pm View
   
What is your environment: ASP.NET, WinForm, WPF. WPF would be easy
Clifford Nelson 30-May-12 13:10pm View
   
You hit it on the nose. Vote, thanks
Clifford Nelson 29-May-12 12:49pm View
   
Thanks
Clifford Nelson 26-May-12 0:23am View
   
I was thinking of the classes created and completely missed the issue with NVARCHAR. Obviously there is no way to simulate as a type NVARCHAR since string is nullable.
Clifford Nelson 25-May-12 18:53pm View
   
He is looking to figure out if fields can have a null value, not if they are null.
Clifford Nelson 24-May-12 23:56pm View
   
The commented area was what I found searching using BING. I just used what I found, and made it into an equation. Did I answer you question, you have not rated it or accepted the solution.
Clifford Nelson 24-May-12 19:25pm View
   
Thanks Actually you did not vote.
Clifford Nelson 24-May-12 0:13am View
   
Glad it was of assistance.
Clifford Nelson 24-May-12 0:03am View
   
Maybe what you will need to do is use the Excel Interopt to create the Excel spreadsheet instead of using SQL.
Clifford Nelson 23-May-12 23:36pm View
   
Interesting and good link, but does not really answer the question since want to export to Word document.
Clifford Nelson 23-May-12 11:35am View
   
You can do this with the XamDataGrid using the pivot table. You can also do a custom grid where you create a control class inheriting from grid.
Clifford Nelson 22-May-12 0:39am View
   
How about providing information on how to do it with JavaScript. Link to an article would have been very helpful.
Clifford Nelson 21-May-12 17:42pm View
   
It appears to me that you are reading only the first row of the excel sheet. You will probably be better off using the excel interopt.
Clifford Nelson 21-May-12 11:37am View
   
That tells me that a row has not been selected (clicking the button obviously does not cause the row to be selected). You may be able to cast the sender. and get parent. Not sure since do not have code
Clifford Nelson 21-May-12 0:31am View
   
Good find. I knew that had to find the registry location, and a project that does it is even better.
Clifford Nelson 21-May-12 0:03am View
   
Reason for my vote of 1
This is not an article.
Clifford Nelson 20-May-12 23:14pm View
   
You are wrong on several accounts.

First of all you don't even want to have the data in the form class, you want to use MVP/MVC. However that is much more complex than just using another class. I do not see much point in using another class for just this communication.

There are good reasons for there to be a child form that does not prevent access to the parent form. The Microsoft Office Find Replace dialog is a good example. Users get use to being able to go between the two. I could give you tons of examples where you might want to do this.

I have never been a fan for MDI form, and seems that it is one its way to oblivian, thank god
Clifford Nelson 20-May-12 22:01pm View
   
There are no user settings, but the question did not indicate that it had to be for user settings. You are now making the assumption, and you are attacking me for my assumption! Amazing the arrogance.
Clifford Nelson 20-May-12 21:54pm View
   
Apparently you are the one that is wrong: Yes, you can use Settings.Settings files for web application projects. Set it up just like in your WinForms projects. With a web project, you are limited to Application scope though - you cannot create user-scoped settings.
See http://stackoverflow.com/questions/1052055/can-you-use-settings-settings-file-for-asp-net-sites-also

Just go to project properties, and Settings, and it lets you create a settings. You are the one that now has egg on your face. How do I give you a one for being so positive your are right when you are wrong......
Clifford Nelson 20-May-12 21:35pm View
   
You never make an assumption? In the environments I am familiar with Settings work, and that is pretty much every other environment in Visual Studio. So next I guess I cannot give advice on adding and subtracting in ASP.NET because maybe it is different in ASP.NET from WinForms, Silverlight, WPF, Console.
Clifford Nelson 20-May-12 20:31pm View
   
Deleted
You still are not giving enough information. However, if you are using Visual Studio, you can open the Server Window, and there you select the database type (it can be a database file). It should be able to guide you through finding the database. If you an an entity framework file, this will create the connection string, putting it in the config file. Hope this helps more.

Incidently, whoever gave the one, are you being an a**h*** or do you have a reason for the 1????
Clifford Nelson 20-May-12 20:25pm View
   
I am so very sorry, such a horrible mistake. Not an ASP.NET developer. Was able to use the Settings on Silverlight. Assumed, obviously a really big big mistake since I assmume you gave me the 1,
Clifford Nelson 20-May-12 10:55am View
   
Thanks for the update
Clifford Nelson 19-May-12 17:44pm View
   
I agree that the Head First is probably the best starting place.
Clifford Nelson 19-May-12 10:54am View
   
This is not a good solution, it is recommended that you use the Path.GetFileNameWithoutExtension
Clifford Nelson 19-May-12 0:12am View
   
In the newer frameworks it is recommended that WCF be used for Web Services. It is not that hard to set up a basic Web Service in WCF. Then if you need to enhance with security, or whatever, you will find it is much easier. WCF has been available for 4 years, almost half the lifetime of .NET. Time to move up to WCF. To see a very basic example look at http://www.codeproject.com/Articles/97204/Implementing-a-Basic-Hello-World-WCF-Service

Hope this helps somewhat.
Clifford Nelson 17-May-12 12:47pm View
   
I am a little concerned about the following:

int i = Convert.ToInt32(TextBox2.Text);
that could cause an exception if the user can make changes to TextBox2. Use the int.TryParse(): http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/549690f2-4f5e-4872-8d2c-7dcf529e53e4
Clifford Nelson 16-May-12 12:10pm View
   
What is your environment: WinForm, ASP.NET, WPF?
Clifford Nelson 16-May-12 12:09pm View
   
Do you mean that when on the form, and a key is pressed, you want a text box to appear, or something else. I assume you are using WinForm